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
What is the server name in sql server?
Which data types generate inaccurate results if used with an = or <> comparison in a where clause of a sql statement?
When does the auto update index statistics feature in sql server turn itself on?q) what specific conditions database should meet, before you can bulk copy data into it using bcp?
Tell me something about security and sql azure?
What is exporting and importing utility?
How global temporary tables are represented and its scope?
Can I run multiple instances of sql server 2000 at the same time on one computer?
What are the differences between char and nchar in ms sql server?
What is the cartesian product of the table?
What is default constraint?
What is database white box testing?
What is the difference RDBMS and Graph Database?
What is relationship? What number of sorts of relationship are there?
Do you know what is similarity and difference between truncate and delete in sql?
Which are new data types introduced in sql server 2008?