How to find out duplicate records in a table(Query)

Answer Posted / santosh

we have to use the group by with having command to get the duplicate values. this query shall show the result of only the users have duplicate values in the employee table.

Syntex:
Select columnName From Table_name
Group By columnName
Having count (*) > 1

Example:
SELECT UserID FROM employee
GROUP BY userid
HAVING count( * ) > 1

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Mention what are the categories of defects?

800


Explain functional testing?

861


how cam www sites be tested

1686


What is ieee - institute of electrical and electronics engineers?

788


What are the experience-based testing techniques?

798


What is branch coverage?

753


viewing entire results after the batch run in qtp Is there is a easier way view the complete results with out opening one by one test scripts

1800


What is user documentation?

801


How u r managing the staff unavailability?

2047


What do you mean by automated testing?

828


Testing activity which is performed to expose defects in the interfaces and in the interaction between integrated components is?

860


What is the maximum length of cable supported in SCS-1,2 and 3?

1560


Please some one answer these Q's 1.Modules in Pension Domains ? 2.What Should we Test on Pension Domain.? Thanks in Advance Stewie

2726


What studies data flow analysis?

937


What is difference between known regression testing and unknown regression testing?

827