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...

Write a query to find second highest salary of an employee.

Answer Posted / gvmahesh

I write the query for this question using OLAP functions.

select e1.* from (select ename,sal,rank()
over(order by sal desc) rank from emp) e1
where e1.rank=2;

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is #table in sql?

990


What is sql used for?

1058


How sql query is executed?

1064


Can we rename a column in the output of sql query?

947


How do I make sql search faster?

936


What are sql*plus environment variables?

1029


Is sql difficult?

1100


What is the difference between execution of triggers and stored procedures?

1047


define sql delete statement ? : Sql dba

969


How do I run a pl sql program?

1060


Is like operator in sql case sensitive?

960


Write a program that shows the usage of while loop to calculate the average of user entered numbers and entry of more numbers are stopped by entering number 0?

2226


Which kind of parameters cannot have a default value in pl sql?

1069


What is cte sql?

924


What does an inner join do?

1089