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


Please Help Members By Posting Answers For Below Questions

how to fetch alternate records from a table? : Sql dba

601


What are the different types of joins in sql?

585


Explain what is sql?

610


What is sql catalog?

568


where are cookies actually stored on the hard disk? : Sql dba

582






Does sqlite need a server?

541


How much does sql certification cost?

548


What are character functions in sql?

498


what is the bond code in materialized view?

2489


What is blind sql injection?

578


what is a constraint? : Sql dba

715


How do I start sql profiler?

561


How to Execute a Package in PL/SQL.?

587


What is sqlcommand?

556


Can we use ddl statements in stored procedure?

697