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
How many types of primary keys are there?
What is the starting oracle error number? What is meant by forward declaration in functions?
What are all the ddl commands?
Can you do multiple joins in sql?
how to shutdown mysql server? : Sql dba
Which command is used to delete a trigger?
what is the difference between group by and order by in sql? : Sql dba
how to run 'mysql' commands from a batch file? : Sql dba
Table A Table B 1 1 2 1 3 1. Union & union all --> A Union B , A Union all B 2. Minus , Intersect --> A minus B , B Minus A , A Intersect B 3. Joins A join B , A Left Join B A Right Join B , A full Join B 4. %Type - Uses & Benifit 5. Truncate & Delete 6. Pragma Autonomus Transaction 7. how to Perform DDL from function or procedure 8. Can we have DML inside Function 9. Rank & Dense Rank diffrence 10. Water Mark in Oracle 11. Index , Can we have index in all column of table if no then why ?
What is %type in pl sql?
Can we connect to postgresql using sql developer?
What is the difference between syntax error and runtime error?
how to drop an existing view in mysql? : Sql dba
what is try_catch block in procedure
what is the use of set statement in tsql? : Transact sql