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 / dinesh kumar
delete from table_name alias1
where rownum < ( select max(rownum) from table_name alias2
where alias1.col1 = alias.col2 );
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is auto increment feature in sql?
What is sqlerrm?
Is left join faster than inner join?
How can you select unique records from a table?
Is natural join same as inner join?
what is 'trigger' in sql? : Sql dba
Why we use cross join?
what happens when the column is set to auto increment and you reach the maximum value for that table? : Sql dba
How do I save the results of sql query in a file?
What is an alias command?
What is rowtype?
What is trigger and how to use it in sql?
How do I sort a table in sql?
What is sqlite used for?
What is the current version of postgresql?