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 rowid in sql?

906


What is record data type?

858


Does truncate free space?

946


Is primary key a clustered index?

910


what is meant by nl2br()? : Sql dba

974


Can a primary key be a foreign key?

969


Does truncate remove indexes?

970


What is relationship? How many types of relationship are there?

1070


What are the rules to be applied to nulls whilst doing comparisons?

1273


What is clustered and nonclustered index in sql?

894


What are the two types of exceptions in pl/sql?

965


What is a call statement? Explain with an example.

951


What is materialized view in sql?

871


Where is sql database stored?

919


Why do we use sql constraints?

1123