how to retrive only second row from table in sql server
2000?
Answers were Sorted based on User's Feedback
Answer / ramana
Table Like this
Create Table Employee(Name varchar(20),Location
varchar(20),Salary int)
Query Like this
Select top 1 * from employee where Name not in(select top 1
Name from Employee)
it will display second record....
Is This Answer Correct ? | 2 Yes | 2 No |
Answer / madhuparna
select top 1 * from (select top 2 * from employee)A
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / prabhat sharma
select top 1 * from xyz where rno > (select top 1 rno from xyz)
rno is a column name and xyz is a table name
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / jayaraman b
select min(emp_no) from
(select top 2 * from emp order by emp_no desc)A
--This will give you the 2nd largest Salaried employee
select max(emp_no) from
(select top 2 * from emp order by emp_no desc)A
--This will give you the 1st largest Salaried employee
Is This Answer Correct ? | 0 Yes | 0 No |
Does dbcc checkdb requires db to be in single_user mode? : sql server database administration
What is the use of DBCC commands?
What is the difference between SSAS 2000 and SSAS 2005?
How can I know what locks are running on which resource?
wht's the differece between sqlserver05 and sqlserver2000
What are the benefits of filtered indexes?
What is query cost in sql server?
What is the difference between upgrade and migration in sql server?
Diffrent types of function
Define synonym?
What is spid in sql server profiler?
What is nolock?