write a query to delete similar records in same table
Answer Posted / sivadasan
I think simply we can do like the following..
1. First we have to transfer all data from a table to
temporary table
create table Temp_table as select * from original_table;
2. Delete all record from Original Table....
delete original_table;
3. Now we can write a query by using INSERT and UNION
If any issue let me know....
insert into original_table (select * from temp_table
UNION select * from UNION )
| Is This Answer Correct ? | 0 Yes | 3 No |
Post New Answer View All Answers
What is the command used to fetch first 5 characters of the string?
what are the difference between clustered and a non-clustered index? : Sql dba
What is mdf ldf and ndf?
What's the difference between a primary key and a clustered index?
Describe types of sql statements?
What is equi join in sql?
how to rename an existing table in mysql? : Sql dba
What do you know by pl/sql cursors?
What is the difference between delete and truncate commands?
what is the syntax used for partition in tsql? : Transact sql
How do you go back in sql?
Does asenumerable execute the query?
Where not exists in sql?
How do you select unique values in sql?
What is the difference between distinct and unique in sql?