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 sql profiler. What are the default templates with it? : sql server database administration
Where sql server usernames and passwords are stored in a sql server?
How to Improve the performencs of SQL Server 2005 exclude stored Procedure and Indexes?
What are system databases into sql server (2005/2008)?
Can we use custom code in ssrs?
what does the automatic recovery do? : Sql server administration
What is a transact-sql statement?
What is filtered index?
How to connect sql server management studio express to sql server 2005 express?
Write a query to include a constraint, to check whether the employee salary is greater than 5000?
What is Fragmentation and Defragmentation? For 32GB Table,How can we do the fragmentation?
What is multilevel indexing?
How can a database be repaired?
What is a result set object returned by mssql_query()?
Can binary strings be used in arithmetical operations?