write a query to delete similar records in same table

Answer Posted / manjula

DELETE FROM User_Details WHERE UserID=(
SELECT t1.UserID FROM
( SELECT UserID, count(*) AS Counts FROM User_Details GROUP
BY UserID HAVING count(*) > 1 )AS t1
)

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is sql resultset?

505


Can we use the cursor's to create the collection in PL/SQL?

497


Explain the the update statement in sql?

546


What are all ddl commands?

523


how to escape special characters in sql statements? : Sql dba

489






How do you run a query?

563


what is subquery? : Sql dba

551


What is rank dense_rank and partition in sql?

523


Can there be 2 primary keys in a table?

532


How do you use collections in procedure to return the resultset?

1768


Is keyword pl sql?

536


What are reports usually used for?

537


what are the advantages a stored procedure? : Sql dba

526


What is sql performance tuning?

469


What is an exception in PL/SQL? What are the two types of exceptions?

598