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

Define outer join in sql server joins?

537


What is wide table?

548


What is difference between stored procedure and user defined function?

560


hi, the following are the outputs of sp_spaceused and sp_tempdbspace sp_spaceused ------------ database size unallocated size tempdb 77752.95 MB 28026.99 MB sp_tempdbspace ------------- database size spaceused tempdb 77752.945312 1.007812 the unused space in sp_spaceused is nearly 28 Gb and in sp_tempdbspace is nearly 76 Gb cany any one explain about this output and why its giving different results.

2481


What is database dimension? : sql server analysis services, ssas

630






What is difference between line feed ( ) and carriage return ( )?

532


Explain what is “asynchronous” communication in sql server service broker?

505


What are differences in between sql server 2012 and sql server 2016?

583


Explain Geography datatype in SQL Server

637


What is the openxml statement in sql server?

547


Mention the 3 ways to get a count of the number of records in a table.

560


Explain about thread and memory management process of SQL?

550


What is acid properties?

604


What are the authentication modes in sql server? How can it be changed?

609


What is inline table-value user-defined function?

605