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
What is after dml trigger?
What are the security related catalog views? : sql server security
When a primary key constraint is included in a table, what other constraints does this imply?
What is a transact-sql statement batch in ms sql server?
Explain database normalization?
What happens if null values are involved in bitwise operations?
Explain iaas, paas and saas?
what is the main function of a query parameter?
Write a program to fetch first 10 records from a file?
How to use wildcard characters in like operations in ms sql server?
Which are the new data types introduced in sql server 2008?
List the different types of collation sensitivities in sql server?
Explain what is scheduled job and how to create it?
How extra digits are handled with numeric data type literals?
How can we rewrite sub-queries into simple select statements or with joins?