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 / elumalai.k
select id,max(salary)from employee where salary<(select
max(salary)from employee)
Is This Answer Correct ? | 15 Yes | 6 No |
Post New Answer View All Answers
What command do we use to rename a database?
What do you mean by data integrity?
What is the difference between an index and a unique index?
What is 5nf in normalization form?
How to change a login name in ms sql server?
When cursors are useful?
What method is used by the Command classes to execute SQL statements that return single values?
How to create a view on an existing table in ms sql server?
Explain iaas, paas and saas?
What are indexes in sql?
What programming language would you use to create embedded functions in ssrs?
Ways to improve the performance of a SQL Azure Database?
What is the name of the system variable that returns the number of rows affected by a SQL statement?
What are the different types of columns types constraints in the sql server?
How to insert data with null values?