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 / amit
SQL>DELETE FROM <TABLE NAME>
WHERE ROWID NOT IN (SELECT MIN(ROWID) FROM <TABLE NAME>
GROUP BY SAL);
| Is This Answer Correct ? | 9 Yes | 3 No |
Post New Answer View All Answers
What is substitution variable?
how to enter characters as hex numbers? : Sql dba
What is the difference between having clause and where clause?
Why use truncate instead of delete?
what is recursive stored procedure? : Sql dba
what is the difference between truncate and drop statements? : Sql dba
How does sql store data?
What type of database is cloud sql?
what is column? : Sql dba
What is procedure function?
How do I create a sql database?
List different type of expressions with the example.
Is sql dba a good career? : SQL DBA
What is union and union all keyword in sql?
What is #table in sql?