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 are different types of replication in sql server?
Explain the difference between functions and stored procedures in sql server?
What authentication modes does sql server support?
Can you explain various data region available in ssrs with their use?
What is 3nf normalization form?
How to create a simple user defined function in ms sql server?
Explain error handling in ssis?
What is the purpose of a table?
How important do you consider cursors or while loops for a transactional database?
You notice that the transaction log on one of your databases is over 4gb the size of the data file is 2mb what could cause this situation, and how can you fix it?
How to use old values to define new values in update statements in ms sql server?
How can you start sql server in different modes?
How do use Having,Group by,Group function in SQL?
What is multi-statement table-value user-defined function?
How should i optimize the time for execution of stored procedure having single input and many output from the different tables?