How to retrieve duplicate rows in a table?
How to delete the duplicate entries in a table?

Answer Posted / dilip

Ans for 1st Query
How to retrieve duplicate rows in a table?

SELECT * FROM EMP1 WHERE (EMP_ID IN (SELECT emp_id FROM
emp1 GROUP BY emp_id HAVING COUNT(emp_id) > 1))

Is This Answer Correct ?    12 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is used to replicate sessions between instances in coldfusion clusters?

584


Define indexes?

605


Is the log file is a part of file group?

554


What is @@rowcount in sql?

566


Can sub report data source be different from that of the parent report?

105






How to list all tables in the database using odbc_tables()?

568


What is difference between count (*) and count column?

525


Explain what are sparse columns?

570


Once setting replication, is it potential to own a publisher as sixty four bit sql server and distributor or subscribers as a thirty two bit sql server?

547


How to write the storeprocedure with in the store procedure? and how can we write the store procedure with in a trigger vice versa? plz post me the exact answer?

2117


List all types of constraints in sql server?

516


Explain transaction isolation levels in sql server?

551


What are the default system databases in sql server 2000?

541


hi, the following are the outputs of sp_spaceused and sp_tempdbspace sp_spaceused ------------ database size unallocated size tempdb 77752.95 MB 28026.99 MB sp_tempdbspace ------------- database size spaceused tempdb 77752.945312 1.007812 the unused space in sp_spaceused is nearly 28 Gb and in sp_tempdbspace is nearly 76 Gb cany any one explain about this output and why its giving different results.

2468


on line cluster can we make if yes tell me the procedure

1517