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

Answer Posted / madhavi.bandreddi

select count(*) from (select distinct * from tablename)as
dummytable

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you rename a table in sql server?

568


What is sql azure database?

190


you have couple of stored procedures that depend on a table you dropped the table and recreated it what do you have to do to reestablish those stored procedure dependencies?

686


What are the diifferences between the ms sql server vs mysql?

756


How to convert numeric values to integers in ms sql server?

605






How to use the inserted and deleted pseudo tables?

614


How to get @@error and @@rowcount at the same time?

666


What is provisioning, billing and metering, and connection routing concepts in the service layer?

104


Explain the rules for designing files and file groups in sql server?

638


How to copy data from one table to another table?

649


What are data resources?

580


What are the disadvantages of primary key and foreign key in SQL?

715


How to write character string constants or literals in ms sql server?

640


What is single-user mode?

603


How to backup SQL Server Reporting Services ?

109