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...

I Have Employee table having column name as ID,SALARY
how to get second max salary from employee table with id
ex
ID SALARY
1 20000
7 37000
2 5000

Answer Posted / elumalai.k

select id,max(salary)from employee where salary<(select
max(salary)from employee)

Is This Answer Correct ?    15 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain what stored procedure sp_replcounters is used for? : sql server replication

1525


How do I know if localdb is running?

957


What are the different types of locks in the database?

925


How to create percentile function?

156


Explain how you can configure a running aggregate in SSRS?

163


What stored by the tempdb ? : sql server database administration

1057


What are subquery and its properties?

1054


How do use Having,Group by,Group function in SQL?

1749


What is abstracting periodical?

951


How to specify the collation for a character data type in ms sql server?

1035


Define a cross join?

1040


What are the differences between stored procedure and the dynamic sql?

1101


Why normalization is used?

1017


How to list all dsn entries on your local machine using odbc_data_source()?

1041


What is normalization according to you and explain its different levels?

956