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

What is an active database?

674


What do you know about normalization and de- normalization?

543


What are the common performance issues in sql server?

580


How to implement one-to-one, one-to-many and many-to-many relationships while designing tables?

675


What is scheduled job and how to create it?

653






How to remove duplicate rows from table except one?

661


Insert syudents details in table.Current system date &time insert into joining time.How do insert?( in sysdate only return current system date how do add time?)

1525


What is the process of normalization?

654


What is report rendering ?

109


What do you mean by recursive stored procedure?

594


How many types of local tables are there in sql server?

573


How can we use ConnectorJ JDBC Driver with MS SQL?

647


Can you pass expressions to function parameters?

626


Explain the difference between control flow and data flow?

614


How to call stored procedure using http soap?

610