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
Is clustered index a primary key?
Can we commit in trigger?
What is the maximum size of sqlite database?
Why trigger is used in sql?
What are %type and %rowtype for?
How do you change a value in sql?
What are tuples in sql?
Which is better join or inner query?
what is an alias command? : Sql dba
What are the different tcl commands in sql?
How many times can we commit in a loop?
What are the different types of tables in sql?
What is triggering circuit?
How do I view stored procedures?
How many developers work on postgresql?