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 find the second highest salary from emp table?

Answer Posted / bharat g

select * from (select ename,sal,dense_rank() over (order by sal desc) ranking from emp) where ranking=2;

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 offset and limit in sql?

1065


Is sql free?

975


Compare sql & pl/sql

1143


How many joins can you have in sql?

940


What has stored procedures in sql?

1070


What is not equal in sql?

1131


what is a database lock ? : Sql dba

1176


how can we find the number of rows in a table using mysql? : Sql dba

1089


What are the different dcl commands in sql?

1180


What is embedded sql with example?

1056


Is sql better than access?

1021


explain the difference between delete , truncate and drop commands? : Sql dba

1098


what's the difference between a primary key and a unique key? : Sql dba

1055


The in operator may be used if you know the exact value you want to return for at least one of the columns.

1136


Explain the savepoint statement.

1102