adspace
can anybody tell us, how to select 2nd max salary from
table.
my id is ashish.akk@gmail.com
Answer Posted / prasad237
with x as(select row_number over(order by sal desc) as rid,* from emp)
select * from x where rid=n
we can retrieve nth max sal
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How to enter binary string literals in ms sql server?
what is spatial nonclustered index
How efficient you are in oracle and SQL server?
How to rebuild the master database?
Can we make the the chages By Using the Sql if u know any function or process please inform me Actuall result: BRK1 Break 1 Part 1 00:01:00:00 60 BRK1 Break 1 Part 2 00:01:00:00 60 BRK2 Break 2 Part 1 00:01:00:00 60 BRK2 Break 2 Part 2 00:01:00:00 60 BRK2 Break 2 Part 3 00:01:00:00 60 BRK3 Break 3 Part 1 00:01:00:00 60 BRK3 Break 3 Part 2 00:01:00:00 60 Desired O/P: BRK1 Break 1 Part 1 00:01:00:00 60 Part 2 00:01:00:00 60 BRK2 Break 2 Part 1 00:01:00:00 60 Part 2 00:01:00:00 60 Part 3 00:01:00:00 60
Can we do dml on views?
Why use identity in sql server?
How can we solve concurrency problems?
How do I find query history in sql server?
What are the different subsets of sql?
What are the pros and cons of putting a scalar function in a queries select list or in the where clause?
What is the difference between for xml raw and for xml auto?
What are the different types of subquery?
Can one drop a column from a table?
How to remove duplicate rows from table except one?