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

what is the difference between a local and a global temporary table? : Sql dba

1128


Is ms sql traffic encrypted?

962


Can a foreign key have a different name?

998


What is sql profiler in oracle?

1162


What is a table partition?

1208


What is the least restrictive isolation level? : Transact sql

1107


Does sqlite need a server?

1097


What do you understand by exception handling in pl/sql?

1089


What is the purpose of a secondary key?

1019


Is oracel sql developer written in java?

1169


what are the t string functions available in tsql? : Transact sql

1065


What is restrict in sql?

1179


How to create a menu in sqlplus or pl/sql?

1169


What are tuples in sql?

1200


How is debugging done?

1020