one of the column in my table contains the data like
SAL
----
1000
1000
2000
3000
3000
So my requirement is i want output like
SAL
---
1000
2000
3000
it mean i want to delete duplicate rows in the table
permanently and i want output in the above formatow should u
write query?
Answer Posted / guest
SQL> DELETE FROM <TABLE_NAME>
WHERE (ROWID,SAL) NOT IN
(SELECT MIN(ROWID),SAL FROM <TABLE_NAME>
GROUP BY SAL);
Is This Answer Correct ? | 13 Yes | 5 No |
Post New Answer View All Answers
What is recursive stored procedure?
What is sql*loader?
What are the types of records?
what are local and global variables and their differences? : Sql dba
What are the two types of exceptions in pl/sql?
Can procedure in package be overloaded?
What is linq to sql?
Explain the working of primary key?
Is sql between inclusive?
Which is faster subquery or join?
Does pl sql work in mysql?
Where is sql database stored?
How would you reference column values before and after you have inserted and deleted triggers?
How many types of cursors are available in pl/sql?
What is the difference between database trigger and stored procedure?