write a query to delete similar records in same table
Answer Posted / umadevi
--deletes records within table without changing table name
delete from temp t1 where rowid<(select max(rowid) from temp
t2 where t1.empno=t2.empno) order by empno;
or
--create new table n insert records.
create table t1 as select distinct * from temp;
or
(truncate table)
truncate table t1;
insert into t1 select distinct * from temp;
| Is This Answer Correct ? | 1 Yes | 5 No |
Post New Answer View All Answers
What is output spooling in sql*plus?
What are local and global Indexes and where they are useful.
What is pl sql block structure?
What is t sql in sql server?
Can a table contain multiple foreign key’s?
How to install oracle sql developer?
Is postgresql a server?
what is self join and what is the requirement of self join? : Sql dba
What are reports usually used for?
How is debugging done?
what is try_catch block in procedure
how to check server status with 'mysqladmin'? : Sql dba
What is dml statement?
What is sql clause?
What is a sql driver?