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 find the second highest salary from emp table?

Answer Posted / kasiraya

SELECT SALARY
FROM
(
SELECT ROW_NUMBER() OVER( ORDER BY SALARY DESC) AS
SL_NO,SALARY
FROM EMP
ORDER BY SALARY DESC
)
WHERE SL_NO=2

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how would you write a query to select all teams that won either 2, 4, 6 or 8 games? : Sql dba

1293


how to select unique records from a table? : Sql dba

1053


What is substitution variable?

1001


what is a primary key? : Sql dba

982


What are the types of join in sql?

1027


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

963


Does pl/sql support create command?

1044


What is the maximum database size for sql express?

959


What are the 3 modes of parameter?

1099


how to implement one-to-one, one-to-many and many-to-many relationships while designing tables? : Sql dba

916


What is the use of partition by in sql?

929


Sql technical questions

1201


Explain some predefined exceptions.

990


Can we create view in stored procedure?

909


What are system versioned tables?

966