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 get second highest salary in SQL(as/4000

Answer Posted / raji_4u

select *
from emp e1
where 2 = ( select count(distinct sal)
from emp e2
where e1.sal <= e2.sal
)

Is This Answer Correct ?    8 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is transaction control language (tcl)?

1131


Write the alter statement to enable all the triggers on the t.students table.

1123


Why we use cross join?

950


What is out parameter used for eventhough return statement can also be used in pl/sql?

1071


What is the life of an sql statement?

1018


How do I view output in sql developer?

1082


What does desc stand for?

1065


How many types of relationship are there?

1026


What are the types of index in sql?

1065


How to use distinct and count in sql query? Explain

1014


Can we use rowid as primary key?

984


Is postgresql a nosql database?

1154


Table A Table B 1 1 2 1 3 1. Union & union all --> A Union B , A Union all B 2. Minus , Intersect --> A minus B , B Minus A , A Intersect B 3. Joins A join B , A Left Join B A Right Join B , A full Join B 4. %Type - Uses & Benifit 5. Truncate & Delete 6. Pragma Autonomus Transaction 7. how to Perform DDL from function or procedure 8. Can we have DML inside Function 9. Rank & Dense Rank diffrence 10. Water Mark in Oracle 11. Index , Can we have index in all column of table if no then why ?

1025


How to place comments in pl/sql?

1149


What is serial sql?

970