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

How to recompile stored procedure at run time?

642


Should you normalize audio?

625


What is the tcp/ip port on which sql server runs?

657


Tell me time data type, datetime2, datetimeoffset data type in sql server 2008?

659


How to override dml statements with triggers?

653






What is a print index?

579


Explain the various types of concurrency problem. I.e. Lost or buried updates, uncommitted dependency, inconsistent analysis, phantom read?

586


What is a not null constraint?

676


what information is maintained within the msdb database? : Sql server administration

591


What is perspective, have you ever created perspective? : sql server analysis services, ssas

584


What is a result set object returned by mssql_query()?

660


How to find Duplicate Records In table?

666


what is database replicaion? : Sql server database administration

705


what is an extended stored procedure? Can you instantiate a com object by using t-sql? : Sql server database administration

679


What are the default system databases in sql server 2000?

610