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

select n from (select row_number()over (partition by n order
by n) r,n from test group by n having count(*)>1)

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are different functions in sql?

938


What is fmtonly in sql?

1077


Is it possible to pass parameters to triggers?

1099


What is dynamic query?

964


Which constraints we can use while creating database in sql?

1066


what is user defined functions? : Sql dba

1023


How many types of tables are there?

947


What is java sql driver?

1107


How do you use collections in procedure to return the resultset?

2236


How do you use join?

935


Why is sql*loader direct path so fast?

1099


Can we enter data in a table in design view?

965


Is sql injection illegal?

1012


What is int identity in sql?

1128


Explain the difference between cursor declared in procedures and cursors declared in the package specification?

1134