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 the report builder?

106


if you encounter this kind of an error message, what you need to look into to solve this problem? : Sql server database administration

527


How do I view a script in sql server?

540


Are null values the same as that of zero or a blank space?

580


What are the advantages dts has over bcp?

536






What are the pre-defined functions in the sql server?

524


What is default port number for sql server 2000?

604


1 01 101 01010

1572


What is difference between stored procedure and user defined function?

553


Do you know what are acid properties?

576


What the different topologies in which replication can be configured?

560


How to create stored procedures with parameters in ms sql server?

529


Tell about MOM Tool(Microsoft Operator Manager)?

1413


What is use of except clause? How it differs from not in clause?

604


What is the difference between varchar and nvarchar?

528