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 does the file extension accdb stand for?
How do you update a sql procedure?
What is mutating error?
Why we use stored procedure instead of query?
What is an inconsistent dependency?
How do I sort a table in sql?
what are the advantages and disadvantages of cascading style sheets? : Sql dba
What is cartesian join in sql?
what is oltp (online transaction processing)? : Sql dba
What is sqlcontext?
What has stored procedures in sql and how we can use it?
What is the starting oracle error number? What is meant by forward declaration in functions?
Is sql similar to python?
What is cursor in pl sql with examples?
Can we use join in subquery?