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

How many sql commands are there?

1114


What is the use of index in hive?

1000


what are all the common sql function? : Sql dba

1057


Why is theta join required?

1142


State some properties of relational databases?

1049


list out some tools through which we can draw e-r diagrams for mysql. : Sql dba

965


What are the different schemas objects that can be created using pl/sql?

1017


What is package in pl sql?

1011


What is materialized view. What are different methods of refresh?

1379


What is java sql package?

1088


Is it important to partition hard disk?

1022


What are some predefined exceptions in pl/sql?

1162


How would you convert date into julian date format?

1000


What is cross join sql?

911


what is the difference between delete and truncate commands? : Sql dba

1064