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 / ramu
by using sub quries we can do
select * from emp where sal=select max(sal) from emp where
sal<select max(sal) from emp;
| Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
How to provide values to user defined function parameters?
What is field in algebra?
Explain database normalization?
there is a trigger defined for insert operations on a table, in an oltp system. The trigger is written to instantiate a com object and pass the newly inserted rows to it for some custom processing. What do you think of this implementation? Can this be implemented better? : Sql server database administration
How to edit table in sql server 2017?
Are connections to sql server encrypted?
Why you need indexing? Where that is stored and what you mean by schema object? For what purpose we are using view?
Do you have any idea about the tcl commands?
can an order by clause be used in a creation of a view?
explain different types of backups avaialabe in sql server? : Sql server database administration
What are views in ms sql server?
How to update values in a table with update statements in ms sql server?
Tell me what is difference between view and materialized view?
What is the difference between having clause and where clause in sql server?
How do I create a stored procedure in sql server?