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

Answer Posted / anusha

SELECT COUNT(*)FROM(SELECT DISTINCT columnname FROM
tblname)

Is This Answer Correct ?    7 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to get the query of a table in sql server?

494


What is mean by candidate key?

530


Explain different backup plans?

525


What are policy management terms?

550


What do you understand by a stored procedure?

593






In which files does sql server actually store data?

460


what's the difference between delete table and truncate table commands? : Sql server database administration

476


How do you open a cluster administrator?

619


What is the difference between a primary key and a unique key? Are they the same?

534


how you can deploy an ssrs report?

127


Explain ms sql server reporting services vs crystal reports?

491


What is normalization? Describe its different types.

577


When to use null data driven subscription?

145


Explain different types of self contained sub query?

534


What is meant by datasource?

510