Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 / guest

SQL> DELETE FROM <TABLE_NAME>
WHERE (ROWID,SAL) NOT IN
(SELECT MIN(ROWID),SAL FROM <TABLE_NAME>
GROUP BY SAL);

Is This Answer Correct ?    13 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

explain advantages of myisam over innodb? : Sql dba

1066


What are the sql aggregate functions?

1122


What is rtm stands for?

1093


What is dense_rank in sql?

983


What are three advantages to using sql?

1011


How can triggers be used for the table auditing?

1068


How can we find duplicate records in a table?

945


Does truncate table reset auto increment?

991


what are all different types of collation sensitivity? : Sql dba

980


what is the difference between myisam static and myisam dynamic? : Sql dba

1059


How do you drop a trigger?

985


How many sectors are in a partition?

1076


What is union, minus and interact commands?

1288


What is view explain with example?

927


Does sql support programming?

1064