How to get the count of distinct records. Please give me the
query?

Answer Posted / anilreddy

select count(distinct(columnname)) from tablename

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we perform backup restore operation on tempdb?

571


What are statistics?

570


What is change data capture (cdc) feature?

594


How can delete duplicate records in cte in sql server?

524


How exceptions can be handled in sql server programming?

550






What is extended stored procedures?

574


Explain log shipping and mention its advantages.

601


How many partitions a clustered index has by default in sql server 2012?

668


How to achieve Paging of records in SQL SERVER?

595


What are diverse clauses that form a part of sql?

603


Mention the different types of triggers?

553


What is xml datatype?

663


How do I trace a query in sql server?

543


What is the usage of sign function?

598


Explain indexed views and partitioned view with their syntax.

690