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 get 2nd maximum salary in an employee table ?

Answer Posted / anil_abbireddy

select * from emp a where 2=(select count(distinct sal)
from emp b where a.sal<=b.sal)

Is This Answer Correct ?    30 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the advantages of stored procedure?

1003


what is bcp? When is it used?

1103


What is string join?

974


How to run sql statements through the web interface?

1035


How do I install microsoft sql?

1044


What are the various levels of constraints?

1121


What are the two types of periodical indexes?

936


Explain how can you save or place your msg in a table?

1026


First round ------------------- - Procedure - Packages - Views - Virtual tables - Can we use dcl with in function? - Joins and few scenarios - Triggers and its type - Pragma, type and its functionality - How to create db link in oracle - Materialized view - How to find duplicate values from table? - Cursor and its functionality - Write a script to display friday and its date from a entire year. - Exception Handling Second round ------------------------ Gave a scenario like. Need to write a function to perform. When user try to change a password. It must not be last five password and a given password can be combination of characters, symbols, upper and lower case.

1575


How do you update f as m and m as f from the below table testtable?

1849


What is sql select statement?

1028


Why is sql important?

1098


Do we need commit after truncate?

1072


Which version of sql do I have?

1050


Are subqueries faster than joins?

1015