TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
SQL Server Transact Basic to Expert - Using Count Aggregate function for Distinct Values
Karthikeyan Anbarasan
Jun 14, 2011
3
k
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
SQL Server Transact Basic to Expert - Using Count Aggregate function for Distinct Values
This blog shows how to use the Count funtion to get the count of the distinct values of a columns.
Example:
SELECT COUNT(DISTINCT Productnames) ProductCount
FROM DBO.Products
COUNT() - this is the function used to get the count.
SQL Server Transact Basic to Expert - Using Count Aggregate function for Distinct Values
Next Recommended Reading
SQL Server Transact Basic to Expert - Using Count Aggregate function