Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

How To: Add an IDENTITY column to This View?

$
0
0

Hi,

How to add an identity column to this view:

CREATE VIEW [dbo].[MainStatistics]
AS
SELECT     (SELECT     COUNT(*) AS EXPR1 FROM dbo.Courses) AS CoursestCount,
		   (SELECT     COUNT(*) AS EXPR1 FROM dbo.Certificates) AS CertificatesCount,
           (SELECT     COUNT(*) AS EXPR1 FROM dbo.Organizations) AS OrganizationsCount,
		   (SELECT     COUNT(*) AS EXPR1 FROM dbo.Individuals WHERE (IsSpeaker = 0)) AS IndividualsNoneSpeakersCount,
           (SELECT     COUNT(*) AS EXPR1 FROM dbo.Individuals AS Individuals_1 WHERE (IsSpeaker = 1)) AS IndividualsSpeakersCount

GO

Thanks..


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>