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
Why use triggers in sql?
what is the syntax for using sql_variant_property? : Transact sql
What are the advantages of sql?
How do I turn a list into a table?
What are the benefits of triggers?
How do you update sql?
Sql technical questions
can sql servers linked to other servers like oracle? : Sql dba
How do you declare a constant?
write an sql query to get third maximum salary of an employee from a table named employee_table. : Sql dba
What is 19 null in sql?
What are actual parameters and formal parameters?
can a stored procedure call itself or recursive stored procedure? : Sql dba
Are pl sql variables case sensitive?
What is where clause in sql?