how to select 5 to 7 rows from a table, which contains 10 rows?

Answer Posted / tb

select a.empid, a.ename,a.salary from (select * from emp
order by empid desc LIMIT 6) b INNER JOIN (select * from
emp order by empid asc LIMIT 7) a on b.empid=a.empid

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is delete query?

531


Name and describe few console utilities for ssrs?

249


What is sql server schema compare? How we can compare two database schemas?

574


Which table keeps the locking information?

532


How to backup encryption key ?

127






What is the difference between stored procedure and user defined functions?

638


you notice that the transaction log on one of your databases is over 4gb the size of the data file is 2mb what could cause this situation, and how can you fix it? : Sql server administration

559


What is standby servers? Explain types of standby servers.

520


Why we should not use triggers?

551


What are key constraints?

520


what are the new features in SSRS?

104


What are the two modes of authentication in sql server?

530


How to encrypt Strored Procedure in SQL SERVER?

565


Tell me when is the update_statistics command used?

521


What is encryption key?

86