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 only how should u
write query?
Answer Posted / swastik
DELETE FROM Emp A
WHERE ROWID NOT IN
(
SELECT MIN(ROWID)
FROM Emp B
WHERE A.Sal = B.Sal
)
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
How do you update a sql procedure?
Does group by remove duplicates?
what is a database transaction? : Sql dba
what is innodb? : Sql dba
Can we insert in sql function?
How to select all records from the table?
How to take user input in pl sql?
Can you rollback after commit?
What are %type and %rowtype for?
Explain normalization and what are the advantages of it?
How can the performance of a trigger be improved?
How do I view tables in sql developer?
Which join is like inner join?
What are different types of sql commands?
What are the different types of tables in sql?