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 are inbuilt functions in sql?
What are three advantages to using sql?
What is the difference between the sql*loader and import utilities? : aql loader
What are different types of indexes?
How to use boolean type in select statement?
What is mutating table error?
How insert into statements in sql?
what are the limitations of mysql in comparison of oracle? Mysql vs. Oracle. : Sql dba
What are different types of keys?
what are the t string functions available in tsql? : Transact sql
Can 2 queries be executed simultaneously in a distributed database system?
Does mysql support pl sql?
What is a database event trigger?
what is top in tsql? : Transact sql
Explain what is sql?