Jeetu .NET SQL
Tuesday, 6 September 2011
The best Query to Find out 2nd, 3rd, 4th etc salary from a table
select
top
1
*
from
dupemp
where
salary
in
(
select
distinct
top
4 salary
from
dupemp
order
by
salary
desc
)
order
by
salary
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment