How to find the second largest salary in the emp database and
also How to find 3rd,4th and so on ........ in the emp database
plz mail the answer @ mak2786@gmail.com
Answer Posted / vinay singh
To find any number of Salary..
Select * From Table E1 Where
(n-1) = (Select Count(Distinct(E2.Sal)) From Table E2
Where E2.Sal> E1.Sal)
**Vinay Singh
| Is This Answer Correct ? | 8 Yes | 12 No |
Post New Answer View All Answers
What are the advantages of using cte?
What is the use of =,==,=== operators?
How you trouble shoot when any job fails
What are the difference between “where” and “having” clause in sql server?
Explain atomicity?
Why should one not prefix user stored procedures with ‘sp_’?
How do we know if any query is retrieving a large amount of data or very little data?
How to create a simple table to test triggers in ms sql server?
can an automatic recovery be initiated by a user? : Sql server administration
New concepts of sql server 2005 use in your project.
I have a table Events Events containing cardno,time,id,name--each id has a cardno my requirement is every day each employee swipe the card several times i want to calculate first and last time of each card the output should be name 1 2 6 7 in out in out holiday holiday xxx 09:30 06:30 09:40 06:45 where 1,2...... are dates for example january 1,2, etc. 6 and 7 are saturday and sunday how it is posssible
What is the purpose of the model database?
How to see the event list of an existing trigger using sys.trigger_events?
What is 1nf normalization form?
How check triggers in sql server?