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
Mention the 3 ways to get a count of the number of records in a table.
What is difference between table aliases and column aliases? Do they affect performance?
Explain various On-Delete options in a DB table. Which is the default option?
Define self join in sql server joins?
Explain what is the difference between a local and a global temporary table?
What are the advantages of log shipping?
How to see the event list of an existing trigger using sys.trigger_events?
What are the restraints imposed on the table design by a merge replication?
what are user defined datatypes and when you should go for them? : Sql server database administration
What is 3nf normalization?
You have a table ‘test’ which is a copy of northwind employee table you have written a trigger to update the field ‘hiredate’ with the current date
What is open database communication (odbc)?
Tell me what do you mean by an execution plan? Why is it used? How would you view it?
How many types of attribute relationships are there? : sql server analysis services, ssas
How do you create type- insensitive operator?