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

select sal from (select sal,rank() over(order by sal desc)
as rank from emp) where rank = &no

Actually for this Question there are having lot of method
to get the result, but the interviewer is asking this for
to check whether the interview person know the RANK()
function or not. So the above query is correct

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Does oracle use sql?

880


What is the maximum database size for sql express?

962


what is unique key constraint? : Sql dba

993


What is null in pl/sql?

1023


What does the hierarchical profiler does?

1005


which operator is used in query for pattern matching? : Sql dba

950


how would you get the current date in mysql? : Sql dba

915


Can a view be mutating? If yes, then how?

963


What is the difference between mdf and ndf files?

1063


What is the difference between left join and right join?

890


describe mysql connection using mysql binary. : Sql dba

995


What is data manipulation language?

1137


what are integrity rules?

966


What is scalar and vector?

940


How does an execution block start and end in pl sql?

901