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

What are the different dcl commands in sql?

1069


What is a boolean in sql?

946


What action do you have to perform before retrieving data from the next result set of a stored procedure ?

2529


What is a sql select statement?

996


What is data control language?

949


Define SQL and state the differences between SQL and other conventional programming Languages?

1144


What is having clause in sql?

929


What is pl sql package?

993


What's the difference between a primary key and a clustered index?

947


what is rollback? : Sql dba

1024


What is the non-clustered index in sql?

1011


What type of join is sql join?

924


What is the difference between joins?

977


Write a query to find the names of users that begin with "um" in sql?

926


What is sql character function?

996