how to delete duplicate rows from a specified table(only
single table)
how do you know which join is need to be used

Answer Posted / samir kumar sahoo.

DELETE FROM tablename A WHERE ROWID>(SELECT MIN(ROWID) FROM
tablename B WHERE A.key_values=B.key_values);

Is This Answer Correct ?    6 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Suppose a student column has two columns, name and marks. How to get name and marks of the top three students.

787


What is structural independence and why is it important?

790


What are different clauses used in sql?

847


Can we use rowid as primary key?

763


what is schema? : Sql dba

768


What is the difference between execution of triggers and stored procedures?

781


Is and as keyword in pl sql?

717


Which is faster truncate or drop?

815


How many times can we commit in a loop?

769


What are sql queries used for?

795


How to process query result in pl/sql?

810


Where the sql database files are stored?

728


What program will open a mdb file?

712


Explain what is sql?

845


what are dynamic queries in t-sql? : Transact sql

766