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 is cdc in sql server?
What is the sql profiler?
tell me the disaster recovery plan
Explain transaction server auto commit?
How to convert character strings into numeric values?
what are the types of indexes? : Sql server database administration
Can a stored procedure call itself or a recursive stored procedure? How many levels of sp nesting is possible?
What are different types of roles provided by ssrs?
Why does a sql statement work correctly outside of a user-defined function, but incorrectly inside it?
How many full-text indexes can a table have?
in a table is b in column k (manikanta,sivananda,muralidhar) i want result like (mnikanta,sivnanda,murlidhar) please slove it
Tell me can we use custom code in ssrs?
What are points to remember while using the fillfactor argument?
what are statistics, under what circumstances they go out of date, how do you update them? : Sql server database administration
Explain what is the function of sql server agent windows service?