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

What is auto increment feature in sql?

1068


What is sqlerrm?

882


Is left join faster than inner join?

1065


How can you select unique records from a table?

995


Is natural join same as inner join?

872


what is 'trigger' in sql? : Sql dba

1015


Why we use cross join?

890


what happens when the column is set to auto increment and you reach the maximum value for that table? : Sql dba

971


How do I save the results of sql query in a file?

929


What is an alias command?

1007


What is rowtype?

956


What is trigger and how to use it in sql?

955


How do I sort a table in sql?

983


What is sqlite used for?

935


What is the current version of postgresql?

1007