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 / dinesh kumar

delete from table_name alias1
where rownum < ( select max(rownum) from table_name alias2
where alias1.col1 = alias.col2 );

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is time a data type in sql?

964


what is denormalization. : Sql dba

1162


What are the various restrictions imposed on view in terms of dml?

1018


What is the best partition size for windows 10?

1050


How do I run a sql trace?

1004


Can we insert in sql function?

1142


What is bulk collect in pl sql?

1158


what is bcp? When does it used? : Sql dba

1031


Does oracle roll back the transaction on an error?

1070


What are the rules to be applied to nulls whilst doing comparisons?

1370


what are string data types? : Sql dba

1093


What is the use of triggers?

1085


What is embedded sql in db2?

1061


What is the basic structure of an sql?

1159


How many postgresql users are there, worldwide?

1131