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 to pronounce postgresql?
Explain the working of primary key?
What are the different schemas objects that can be created using pl/sql?
how to enter binary numbers in sql statements? : Sql dba
Does sql view stored data?
how to write date and time literals? : Sql dba
What plvcmt and plvrb does in pl/sql?
What does select * from mean in sql?
Does sql between include endpoints?
what does the t-sql command ident_current does? : Transact sql
What is execution plan in sql?
Why triggers are used?
How do you write an inner join query?
what are the performance and scalability characteristics of mysql? : Sql dba
Explain isolation levels. : Transact sql