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

Answer Posted / kanika

this will also work

select count(distinct columnname) from table

Is This Answer Correct ?    18 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can I track the changes or identify the latest insert-update-delete from a table?

626


What are data driven subscriptions?

85


Define constraints and give an example of their use?

649


What is an indexing strategy?

623


Name few of the dcl commands in sql?

640






What are null values in ms sql server?

655


Can we deploy SSRS reports on our personal website?

132


How is SQL Azure different than SQL server?

101


What is the return type of executeupdate ()?

624


Explain the benefits of user-defined functions?

625


What area unit the various kinds of info compression introduced in sql server 2008?

657


What is a document index?

674


How to include text values in sql statements?

677


What is an entity-relationship diagram (erd)?

680


What is change tracking in sql server?

619