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
explain advantages of myisam over innodb? : Sql dba
What are the sql aggregate functions?
What is rtm stands for?
What is dense_rank in sql?
What are three advantages to using sql?
How can triggers be used for the table auditing?
How can we find duplicate records in a table?
Does truncate table reset auto increment?
what are all different types of collation sensitivity? : Sql dba
what is the difference between myisam static and myisam dynamic? : Sql dba
How do you drop a trigger?
How many sectors are in a partition?
What is union, minus and interact commands?
What is view explain with example?
Does sql support programming?