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

How do you write an index?

524


What are the two characteristics of a primary key?

483


what is single byte over head in oracle..?

1864


Explain how you can copy a file to file content and file to pl/sql table in advance pl/sql?

545


What is sql*loader?

568






How do I count records in sql?

514


What can I use instead of union in sql?

509


How can you view the errors encountered in a trigger?

546


What are the different operators available in sql?

570


explain the advantages and disadvantages of stored procedure? : Sql dba

529


Is big data nosql?

512


what is denormalization. : Sql dba

539


Explain alias in sql?

582


What is pl/sql language case sensitive?

631


What is bulk compiling in pl/sql.?

605