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

select * from(select e.*,row_number() over (order by
e.salary desc)rn from Employee e)where rn between 1 and 2
order by rn

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the sql case statement?

1055


What are pl sql procedures?

1080


What is dynamic query?

1036


What is multiple columns?

1118


What are the types of keys?

1067


What is sql and also describe types of sql statements?

1114


Can we use commit inside a trigger?

1147


What is the basic form of sql query?

996


What are the types of variable use in pl sql?

1138


What do you understand by pl/sql packages?

1106


when is the use of update_statistics command? : Sql dba

1099


How can you load multi line records? : aql loader

1125


what are the different tables present in mysql, which type of table is generated when we are creating a table in the following syntax: create table employee (eno int(2),ename varchar(10)) ? : Sql dba

1080


How does rowid help in running a query faster?

1475


Why is pl sql used?

1030