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

How to raise user-defined exception with custom sqlerrm ?

1063


What is record data type?

861


How many primary keys can a table have?

955


What is bind reference and how can it be created?

967


What is sqlite format?

1113


Does sql*plus also have a pl/sql engine?

1039


State some properties of relational databases?

1003


What is the mutating table and constraining table?

969


How is sql used in oracle?

971


What is the unique index?

1005


what is a view? : Sql dba

1030


What does plv msg allows you to do?

1074


How do I find duplicates in a single column in sql?

954


What is the difference between jpql and sql?

1024


What are sql procedures?

967