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 / bibhudatta panda

DELETE FROM TABLENAME
WHERE ROWID NOT IN(
SELECT MAX(ROWID)
FROM TABLENAME
GROUP BY Sal
)

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Define union, minus, union all, intersect ?

739


Is sql procedural language?

738


Define a temp table?

755


How do you use a while loop in pl sql?

721


What are different types of keys?

737






What is a schema sql?

743


What is the difference between join and natural join?

655


what is the difference between where clause and having clause? : Sql dba

725


what is unique key constraint? : Sql dba

745


what is a constraint? : Sql dba

882


Is a table valued function object?

759


what is a record in a database ? : Sql dba

764


What is blind sql injection?

757


What is a loop in sql?

744


Explain 3 basic parts of a trigger.

1038