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

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

Is This Answer Correct ?    9 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

can sql servers linked to other servers like oracle? : Sql dba

952


what is “go” in t-sql? : Transact sql

1039


Is sql open source?

915


What is sqlerrd?

921


How many unique keys can a table have?

956


What is plpgsql language?

977


What is substitution variable in pl sql?

979


What are the indexing methods?

1002


how to rename an existing table in mysql? : Sql dba

1005


What are sql data types?

948


Can we delete column in sql?

1020


how can we destroy the cookie? : Sql dba

959


Can we debug stored procedure?

957


Write a sql query to convert all character to uppercase after hypen.

1375


Is left join same as join?

937