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
Does partitioning improve performance sql server?
Which sql server table is used to hold the stored procedure script?
What is PROJECTION Operation?
What are the pre-defined functions in the sql server?
What is a field name?
What are binary string data types in ms sql server?
Can we join two tables without primary key?
What are diverse clauses that form a part of sql?
What is instead of trigger sql server?
Comment,Datatypes are unlimited
How to throw custom exception in Stored Procedure?
What are cascading parameters in ssrs reports?
What do you mean by a dependent functionality in a build?
Explain the creation and execution of a user-defined function in the sql server?
What is the use of set nocount on/off statement?