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 |
Can you create a logon trigger in sql server 2005 express edition?
The Difference between 'Count' and 'Count(*)'
In what sequence sql statement is processed?
explain the type of contraints
What are partitioned views?
Well sometimes sp_reanmedb may not work you know because if some one is using the db it will not accept this command so what do you think you can do in such cases?
What is the diffrence between update_one and auto_fix?
How we can compare two database data?
What is difference between clustered and non clustered index?
Insert syudents details in table.Current system date &time insert into joining time.How do insert?( in sysdate only return current system date how do add time?)
Do you know what is openxml in sql server?
Explain the disadvantages of cursors?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)