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
Can variables be used in sql statements?
What is the difference between distinct and unique in sql?
What is difference between hql and native sql?
Explain foreign key in sql?
What is %type in sql?
Can two tables have same primary key?
What does the base_object_type column shows in the user.triggers data dictionary view?
How to return multiple rows from the stored procedure?
What is an exception in pl/sql?
What are %type and %rowtype for?
Which is better join or subquery?
How can I delete duplicate rows?
Explain what is table in a database?
Why we use pl sql?
What is using in sql?