what is syntex second or third highest salary.
thanks & Regards
Dhirendra sinha
Answer Posted / vikas kant
---To get 2nd highest salary----
select Top 1 salary from Emp where marks in(select top 2
salary from Emp order by salary desc)
---To get 3rd highest salary----
select Top 1 salary from Emp where marks in(select top 3
salary from Emp order by salary desc)
Regards Vikas Kant
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How to connect to SQL Azure Database by using sqlcmd?
Explain the properties of the relational tables?
How to edit table in sql server 2017?
How to create a large table with random data for index testing in ms sql server?
How to manipulate data from one table to another table ?
Can sql servers link to other servers?
How to create a view with data from multiple tables?
What are cursors and when they are useful?
In which files does sql server actually store data?
Why is the need for data conversion transformations?
Does order by actually change the order of the data in the tables or does it just change the output?
What are the types of lock supported by ?
How to specify the collation for a character data type in ms sql server?
When cursors are useful?
What are differences in between sql server 2012 and sql server 2016?