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 / bhagya

select * from emp as e1 where 1= (select count(*)from emp
as e2 where e1.sal<e2.sal)

Is This Answer Correct ?    9 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the different index configurations a table can have?

1009


What is the default fill factor value?

1128


What is recursion? Is it possible for a stored procedure to call itself or recursive stored procedure? How many levels of sp nesting is possible?

1016


Explain syntax for viewing trigger?

970


What is serializable?

1089


Recommend an approach to ensuring that all changes in the remote databases synchronize with the SQL Azure database?

128


What is partition, how will you implement it? : sql server analysis services, ssas

1101


How do I create an extended event in sql server?

1003


What is sql stored procedure?

1147


How to fine-tune reports?

279


what is a join? : Sql server database administration

1325


1.how to find the dead lock in sql server? 2.How to fine the memory leaks in sql server? 3.suppose transaction log file increasing what action will take ?

2079


can a database be shrunk to 0 bytes, if not, why? : Sql server administration

1311


Explain atomicity?

1128


What is 2nf normalization form?

1203