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

Is a primary key unique?

617


Can another user execute your local temporary stored procedures?

624


What is attribute hierarchy? : sql server analysis services, ssas

610


What is shrink log file?

588


List the ways in which dynamic sql can be executed?

723






Is a null value equal to anything? Can a space in a column be considered a null value? Why or why not?

726


Can truncate be rolled back?

619


Write a query to include a constraint, to check whether the employee salary is greater than 5000?

1252


What are the steps to insert a table?

623


What is postgresql server?

590


What are the characteristics of modern DBMS?

701


How to encrypt data between dialogs?

664


How to retrieve error messages using odbc_errormsg()?

618


In what sequence sql statement is processed?

669


What are the components of sql server service broker?

599