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 test a dml trigger in ms sql server?
Tell me about joins in database system and explain each in detail.
what is a live lock? : Sql server database administration
What are the new features introduced in SQL Server 2000 (or the latest release of SQL Server at the time of your interview)? What changed between the previous version of SQL Server and the current version?
What is a transact-sql statement?
What will happen if a column containing char type data is changed to the nchar data type?
Find first and last day of current month in sql server
Can you tell me some of the common replication dmv's and their use? : sql server replication
When we should use and scope of @@identity?
What are the steps to follow to configure SQL*Net?
What are the system database in sql server 2005?
what is a schema in sql server 2005? Explain how to create a new schema in a database? : Sql server database administration
What are trace files?
What are the limitations/drawbacks or ssrs 2008 r2?
can an order by clause be used in a creation of a view?