What is meaning of COUNT(DISTINCT column_name) ?

 Posted by Akiii on 5/31/2012 | Category: Sql Server Interview questions | Views: 5746 | Points: 40
Answer:

COUNT(DISTINCT column_name) - returns the number of distinct values of the specified column


For example :-

select COUNT(distinct store_name) from tbl_MEOC_information;


It will fetch distinct rows from the store_name column.


Thanks and Regards
Akiii


| Alert Moderator 

Comments or Responses

Posted by: Ras90it on: 6/1/2012 | Points: 10
distinct mean???

can u able to say clearly ???

Posted by: Akiii on: 6/1/2012 | Points: 10
Hi @Ras90it....

distinct means it will fetch or Count unique values among duplicates !

Thanks and Regards
Akiii
Posted by: Ras90it on: 6/1/2012 | Points: 10
Thank you very much
Posted by: Akiii on: 6/1/2012 | Points: 10
Its okay @Ras90it...



Thanks and Regards
Akiii
Posted by: Ras90it on: 6/1/2012 | Points: 10
I know OOPS concepts only. i want to learn DOTNET 4.0 with Full concepts like LINQ,AJAX, WPF, WCF etc... & SQL SERVER 2008 or 2012. please tel some idea. I need guidance.
Posted by: Akiii on: 6/1/2012 | Points: 10
Your question should be posted in a different category. But anyway, Have a good grip on OOPs because it is the base !

Try learning simple concepts first like ado.net...etc then go for linq, wcf, wpf...etc
these are advance concepts it will take time to have a grip on them.

Here you will find many articles, questions, blogs etc regarding concepts. Start reading them remember "There is no shortcut to anything. You learn by doing " !


Thanks and Regards
Akiii

Login to post response