Find 2nd Highest salery in emp table
Select* from emp where &n=
select * count from emp where (salery >=emp.salery)
Enter n value 2
These query is correct or not. Tell me any other methods.
Answer Posted / r.rajivgandhi
Select max(salary) from emp where salary <(select max
(salary) from emp)
These Query is correct.Try It
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is command parameter in ssrs?
What is the usage of the sign function?
Can an entity have two primary keys?
How to include date and time values in sql statements?
How to start and end transact-sql statements?
Why is sql server log file full?
List out what other servers you can use with ssrs?
How to display a past time in days, hours and minutes?
What is the difference between set and select?
Explain the first normal form(1nf)?
How to add a new column to an existing table with "alter table ... Add" in ms sql server?
Is the order of columns in the set clause important in ms sql server?
Explain what is raid and what are different types of raid levels?
What is table constraint?
How to set database to be single_user in ms sql server?