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 / jas
delete from table_name where rowid > (select min(rowid)
from table_name where a.col_name=b.col_name)
create new_table as select distinct * from table_name;
drop table_name;
create table_name as select * from new_table;
drop new_table;
delete from table_name where rowid not in (select max
(rowid) from table_name where a.col_name=b.col_name)
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is the difference between count 1 and count (*) in a sql query?
Why should I use postgresql?
what's the difference between a primary key and a unique key? : Sql dba
Does sql require a server?
What is view? Can we update view
In what condition is it good to disable a trigger?
What do you mean by stored procedures? How do we use it?
What is dml and ddl?
define sql insert statement ? : Sql dba
What is the main difference between sql and pl/sql?
How do you delete a table?
What is write ahead logging in sql server?
List the ways to get the count of records in a table?
What is the difference between delete and truncate commands?
what is row? : Sql dba