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 difference between delete and truncate commands? : Sql dba
What is sql dialect?
Can we enter data in a table in design view?
Is there a way to automate sql execution from the command-line, batch job or shell script?
What are the types of dbms?
How to pipe multiline string to isql?
What is the difference between microsoft sql and mysql?
Define sql delete statement.
Is sql an operating system?
what is the difference between mysql_fetch_object and mysql_fetch_array? : Sql dba
What are the key differences between SQL and PL SQL?
can sql servers linked to other servers like oracle? : Sql dba
What is full form of rtm?
What is the purpose of normalization?
how to analyze tables with 'mysqlcheck'? : Sql dba