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 only how should u
write query?

Answer Posted / swastik

DELETE FROM Emp A
WHERE ROWID NOT IN
                  (
                   SELECT MIN(ROWID)
                   FROM Emp B
                   WHERE A.Sal = B.Sal
                  )

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why use triggers in sql?

962


what is the syntax for using sql_variant_property? : Transact sql

1051


What are the advantages of sql?

1057


How do I turn a list into a table?

965


What are the benefits of triggers?

1175


How do you update sql?

992


Sql technical questions

1288


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

1013


How do you declare a constant?

966


write an sql query to get third maximum salary of an employee from a table named employee_table. : Sql dba

978


What is 19 null in sql?

977


What are actual parameters and formal parameters?

1109


can a stored procedure call itself or recursive stored procedure? : Sql dba

1037


Are pl sql variables case sensitive?

1053


What is where clause in sql?

1048