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...

how to get second highest salary in SQL(as/4000

Answer Posted / ashish raut

for 2nd highest price..............

SELECT max(Price) as [MaxPrice] from OrderDetails
where Price<(SELECT max(Price)as MaxPrice from OrderDetails)

for 3rd highest Price........

SELECT max(Price) as [MaxPrice] from OrderDetails
where Price<(SELECT max(Price)as MaxPrice from OrderDetails
where price<(SELECT max(Price)as MaxPrice from OrderDetails))

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can there be more than one function with a similar name in a pl/sql block?

996


how to use regular expression in pattern match conditions? : Sql dba

1044


What is the main difference between sql and pl/sql?

1106


What is a database event trigger?

1166


What are the indexing methods?

1058


Is sql a backend?

1033


What is normalization in a database?

1168


What are different types of sql?

1199


Enlist the advantages of sql.

1008


What is sql and how does it work?

1185


How many types of indexes are there in sql?

990


What is meant by truncate in sql?

1074


What is function and procedure in pl sql?

1057


what is cursor and its type, what is ref cursor write a syntax to pass ref cursor into procedure out fucntion and call the procedure

1813


how can we take a backup of a mysql table and how can we restore it. ? : Sql dba

978