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

Can a procedure in a package be overloaded?

1102


Explain constraints in sql?

1088


Does truncate need commit?

1005


How many clustered indexes can you have?

1037


Is join and inner join the same?

1044


How do I know if I have sql express or standard?

1064


Why self join is used in sql?

1031


What is dcl in sql?

1024


Why do we create stored procedures & functions in pl/sql and how are they different?

995


Which column of the user triggers data dictionary view displays the database event that will fire the trigger?

1072


how to delete an existing column in a table? : Sql dba

1062


Can we use rowid as primary key?

1043


What is sql partition function?

1290


Is mariadb nosql?

1090


Is left join inner or outer?

1057