write a query to delete similar records in same table
Answer Posted / sivadasan
Sorry for the previous answer....
We can do like this ,
1. First we have to transfer all data from original_table
table to a 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
insert into original_table (select * from temp_table
UNION select * from temp_table);
any issues let me know.....
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is where clause in sql?
What is sql*loader and what is it used for? : aql loader
what does it mean to have quoted_identifier on? What are the implications of having it off? : Sql dba
What is a left join?
Table 1: col1 Timestamp ---------------- 01-mar-2012 11:12:46 Table 2: col2 Timestamp -------------------- 01-mar-2012 11:12:10 01-mar-2012 11:11:23 Write a query to display a row with table2 col2 value less than tabl1 col1 value. Maximum timestamp value previous to table1 col1 value. Display a result as: Col1 col2 ----- ----- 01-mar-2012 11:12:46 01-mar-2012 11:12:10
Which join condition can be specified using on clause?
table structure: ---------------- col1 col2 ----- ----- 01-mar-2012 11:12:46 01-mar-2012 11:12:10 01-mar-2012 11:12:46 01-mar-2012 11:11:23 Write a query to display the result as shown below: col1 col2 ----- ----- 01-mar-2012 11:12:46 01-mar-2012 11:12:10
What does the sign mean in sql?
What is numeric function sql?
Is sql a scripting language?
what is a constraint? : Sql dba
What does the base_object_type column shows in the user.triggers data dictionary view?
How to run sql functions in pl/sql?
What is database white box testing and black box testing?
How do sql triggers work?