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

Explain steps of normalization?

518


Differentiate between SQL and ORACLE joins and write their syntax.

579


What is the use of keyword with encryption. Create a store procedure with encryption?

573


What are the different types of sub-queries?

594


Can a synonym name of a table be used instead of a table name in a select statement?

570






what are different types of backups available in sql server? : Sql server database administration

489


What are the different types of stored procedures?

542


Can primary key be null?

506


Where the sql logs gets stored? : sql server database administration

519


How much does sql server 2016 cost?

524


Explain an incremental backup?

581


What is the native system stored procedure to execute a command against all databases?

530


How to create sub reports?

192


John exports information periodically from a microsoft sql server database to an oracle database what is the best way to do this?

521


Explain contrast amongst grouped and non-bunched records?

507