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

What is user-defined function? Explain its types i.e. Scalar and inline table value user-defined function?

466


Differentiate between a local and a global temporary table?

539


What is a Join and explain its types?

576


How to create a login account in ms sql server to access the database engine using "create login" statements?

563


What do you mean by tablesample?

630






What are the different types of normalization?

607


what is unique and xaml nonclustered index

550


Difference between connected and disconnected database in .net with sql server?

566


how to determine the service pack currently installed on sql server? : Sql server database administration

555


Explain about extended stored procedure?

481


Explain about sql server login?

585


How to make remote connection in database?

589


How to use union to merge outputs from two queries together in ms sql server?

556


What are built in functions?

570


What command would you use to create an index?

580