Following are some of the question related to below
mentioned query?
select e1.salary from employee3 e1
where 2=
(
select count(distinct(e2.salary))
from employee3 e2 where e2.salary>=e1.salary
)
1) What the query returns?
2) How it works? - Detail explanation (what the sub query
does, why it is (where 2=)....etc...Please?
Answer Posted / haris
yah this query works fine and return the 2nd highest salary.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What do you understand by user-defined function in the sql server and explain the steps to create and execute a user-defined function in the sql server?
What is the ‘fillfactor’?
What is clustered index
How do you create type- insensitive operator?
How to enter date and time literals in ms sql server?
How to define and use table alias names in ms sql server?
Is null in sql server?
What is query optimization process?
How sql server enhances scalability of the database system?
How to copy data from one table to another table?
How to receive returning result from a query?
What are the disadvantages of using the stored procedures?
Do you know what are the restrictions that views have to follow?
What do you understand by replication in sql server? Mention the different types of replication in sql server.
What are three ways you can use an identity value inside a trigger? Why would you prefer one way over another?