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
Does group by sort data?
What is isolation levels?
Why we need to use secondry database file? though, we can do same work using primary database file also.
What is attribute hierarchy? : sql server analysis services, ssas
Determine how to use the inserted and deleted pseudo tables?
Mention a few common trace flags used with sql server?
What do you understand by hotfixes and patches in sql server?
Explain what are magic tables in sql server?
How to delete exactly duplicate records from a table?
Write a query to include a constraint, to check whether the employee salary is greater than 5000?
How to throw custom exception in Stored Procedure?
Explain the difference between clustered and non-clustered index?
What is the difference between stored procedure and user defined functions?
What is sql server used for?
How does stuff differ from the replace function?