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
Explain sql delete command?
What are the database roles? : sql server security
Why use update_statistics command in sql server?
What are statistics?
What is an index in a database?
what is a sub-report?
What is Sqlpaging in SqlServer 2005 ?
What is the cartesian product of the table?
write an SQL query to list the employees who joined in the month of January?
Explain difference between cross join and full outer join?
Is profiler the only tool that has the ability to audit and identify ddl events? : sql server security
What are the events recorded in a transaction log?
How is table type constraint applied to a table?
Beginning with sql server version 7 0, a new enhanced data type nchar was added what type of data is supported with this data type?
How can I get data from a database on another server?