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 / kavitha
select * from emp as a
where sal < 2 from emp as a1
on
(
a.idno=a1.idno
)
| Is This Answer Correct ? | 4 Yes | 0 No |
Post New Answer View All Answers
What are diverse clauses that form a part of sql?
What is mean by clustered index and non clustered index, give syntax of creation? : sql server database administration
What is similarity and difference between truncate and delete in sql?
How to insert multiple rows with one insert statement in ms sql server?
Please differentiate between a local and a global temporary table?
explain databases and sql server databases architecture? : Sql server database administration
What are information schema views?
What is sql server management studio? : sql server management studio
How to execute a stored procedure in ms sql server?
How you can find out if an index is useful to the optimizer?
What happens when converting big values to integers?
Give me any three differences between Truncate and Delete.
What is the difference between varchar and varchar(max) datatypes?
How can we rewrite sub-queries into simple select statements or with joins?
What is database replication?