How to count the number of duplicate items in a table?

Answer Posted / pavan

Hi,
try this query.In this query sal one val is duplicated
4items


select sal,count(sal) from test group by sal having count
(*)>1

Is This Answer Correct ?    4 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is exclusive locks?

702


You want to check the syntax of a complicated update sql statement without executing it. What command should you use?

677


Does sql server use t sql?

724


What is the process of indexing?

705


How to set database to be single_user in ms sql server?

761






What is the distinction amongst delete and truncate?

734


Give an example of SQL injection attack ?

732


Explain different types of collation sensitivity?

701


What is database white box testing?

840


Write a sql query to sort on different column name according to the parameters passed in the function?

693


What is the xml datatype?

805


What are dml triggers and types of dml triggers?

714


Explain the working of sql privileges?

797


How many replicas are maintained for each SQL Azure database?

138


What do you mean by an execution plan?

774