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 / yaswanth
delete from employees where rowid NOT IN(select max(rowid) from employees GROUP BY salary)
| Is This Answer Correct ? | 7 Yes | 2 No |
Post New Answer View All Answers
Which are the different types of indexes in sql?
Explain how can you save or place your msg in a table?
What is a boolean in sql?
What is trigger and types?
What is latest version of sql?
What is a schema? How is it useful in sql servers?
What are keys in sql?
How do you explain an index?
How do I install microsoft sql?
How to order siblings in oracle hierarchy queries?
What does over partition by mean in sql?
Mention what does plvtab enables you to do when you showthe contents of pl/sql tables?
what are the t string functions available in tsql? : Transact sql
How do you copy a table in sql?
What does varchar include?