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
How will you monitor replication activity and performance? What privilege do you need to use replication monitor? : sql server replication
what is the information that can be stored inside a bit column? : Sql server database administration
Explain system views?
Can a table have 2 primary keys?
can an order by clause be used in a creation of a view?
code to create procedure for taking databse backup in sql server or i have the query for it but what it's query returns means i want to show on my jsp that the databse backup has been taken on the basis of that return value.does it returns 0 or 1.wat is the code for that
what are different types of raid configurations? : Sql server database administration
what are the core components of SSRS?
If I delete a template from the list in sql studio, will it be deleted from the hard disk? : sql server management studio
How to remove duplicate rows from table except one?
How to write the storeprocedure with in the store procedure? and how can we write the store procedure with in a trigger vice versa? plz post me the exact answer?
Explain multiserver query
how would you write a sql query to compute a frequency table of a certain attribute involving two joins? What changes would you need to make if you want to order by or group by some attribute? What would you do to account for nulls?
Define inner join in sql server joins?
What do you understand by check constraint in sql server?