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

what are date and time data types in mysql? : Sql dba

1024


What operators deal with null?

1156


What is an implicit commit?

1103


Explain select statements in sql?

1107


What is self-join and what is the requirement of self-join?

1192


How do you sort in sql?

1071


Is left join same as join?

1039


What is dba in sql? : SQL DBA

1095


What is pl sql commands?

1098


How to connect a sql*plus session to an oracle server?

1176


Are ddl triggers fired for ddl statements within a pl/sql code executed using the dbms.sql package?

1140


What is query syntax?

1020


What is offset and limit in sql?

1105


Is trigger a stored procedure?

984


What does bitemporal mean?

1117