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 / sathish p

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

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Differentiate pl/sql and sql?

1038


what is meant by urlencode and urldocode? : Sql dba

1117


Why do we use sql constraints? Which constraints we can use while creating database in sql?

998


How to order siblings in oracle hierarchy queries?

1008


What is online transaction processing (oltp)?

979


What are the benefits of stored procedures?

1023


Why having clause is used in sql?

944


What is the example of procedure?

895


How do I make my sql query run faster?

912


What are different types of queries in sql?

1074


How do I view a sql trace file?

979


what are the maximum number of rows that can be constructed by inserting rows directly in value list? : Transact sql

925


What is the source code of a program?

1024


What are the subsets of sql?

1080


What is a loop in sql?

955