Click here to Skip to main content
13,097,230 members (64,610 online)
Click here to Skip to main content
Alternatives (1)
Add your own
alternative version

Tagged as


6 bookmarked
Posted 24 Nov 2010

COUNT of DISTINCT Rows in SQL Server

, 26 Nov 2010
COUNT of DISTINCT Rows in SQL Server


Members may post updates or alternatives to this current article in order to show different approaches or add new features.

26 Nov 2010
Vivek Johari
Nice tip :)But if you have any column say empid which have the unique constraint then it is better to use the following SQL queryselect count(distinct empid ) from employees


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

India India
Ravikiran Malladi is a senior software professional in Microsoft technologies. He has global IT experience of over 10 years and has compulsive habit of writing tools, particularly for the projects he works on. He has vast experience in the roles of senior developer, technical analyst, technical architect besides in technical lead roles.

His hobbies include chess, music, cricket, web sites along side writing technical articles and technical blogs.

| | Privacy | Terms of Use | Mobile
Web03 | 2.8.170813.1 | Last Updated 26 Nov 2010
Article Copyright 2010 by mravikiran
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid