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 the use of anchoring object? what r the difference between anchoring object & enclosing object? can any one tell me all the details?

2189


How can we solve sql error: ora-00904: invalid identifier?

885


Is sqlexception checked or unchecked?

723


How do I view a view in sql?

697


How to revise and re-run the last sql command?

835






Is sql scripting language?

725


What is sql prepared statement?

737


how many triggers are allowed in mysql table? : Sql dba

758


Why coalesce is used in sql?

663


what are the advantages of mysql in comparison to oracle? : Sql dba

704


What is the difference between view and stored procedure?

690


Write a sql select query that only returns each name only once from a table?

757


What is a pl/sql block?

759


what are the properties and different types of sub-queries? : Sql dba

704


How consistent is the view of the data between and within multiple sessions, transactions or statements ?

1924