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

Answer Posted / soumya

select distinct (columnname) from tablename

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Are semicolons required at the end of sql statements in sql server 2005?

570


what are triggers? : Sql server database administration

508


What is log ldf?

559


Explain what is lock escalation?

581


Can we add an identity column to decimal datatype?

589






What is Cross Join and in which scenario do we use Cross Join?

576


What are Spatial data types in SQL Server 2008

558


What are the risks of storing a hibernate-managed object in a cache? How do you overcome the problems?

600


Can a table have 2 foreign keys?

511


How do you improve the performance of a SQL Azure Database?

115


Can you please explain the difference between primary keys and foreign keys?

661


what is an extended stored procedure? : Sql server database administration

505


Explain “not null constraint” in sql server?

527


Explain acid?

616


How can I add Reporting Services reports to my application?

91