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
How many types of relationship are there?
what is a tablespace? : Sql dba
Is a secondary key the same as a foreign key?
How does join work in sql?
Why use truncate instead of delete?
What is a ddl command?
What is sql server and ase?
What is the use of nvl function?
what are the difference between clustered and a non-clustered index? : Sql dba
Is it possible to remove child records without removing master table records...the two having pk,fk relationship?
Does inner join return duplicate rows?
discuss about myisam key cache. : Sql dba
Why we use join in sql?
What is scope of pl sql developer in future?
What is insert command in sql?