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 / karthik ramasamy

Select max(salary) from salarymaster where salary <(select
max(salary) from salarymaster)

OR

SELECT MAX(SALARY) FROM SALARYMASTER WHERE SALARY NOT IN
(SELECT MAX(SALARY) FROM SALARYMASTER)

OR

Select max(salary) from salarymaster where salary<(Select
max(salary) from salarymaster)

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What jobs use sql?

981


How do you determine the current isolation level? : Transact sql

1158


Cite the differences between execution of triggers and stored procedures?

1077


what are date and time data types? : Sql dba

983


how to convert dates to character strings? : Sql dba

1169


How to create a menu in sqlplus or pl/sql?

1122


What is sql performance tuning?

917


What are the different tcl commands in sql?

1175


Why query optimization is needed?

927


Why do we use view in sql?

961


what is the difference between cluster and non cluster index? : Sql dba

1026


Explain autonomous transaction.

1154


What is prepared statement in sql?

1049


Can we write ddl statements in functions?

1116


what is a composite key ? : Sql dba

1059