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

Answer Posted / ayyappanramachandran

You can achieve this by using following Query

select * from(select top 3 * from employees where
employeeid in(select top 7 employeeid from employees where
employeeid not in(select top 4 employeeid from employees
order by employeeid)))e order by employeeid.

Thanks
AyyappanRamachandran

Is This Answer Correct ?    13 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the new security features added in sql server 2014? : sql server security

570


What is “asynchronous” communication in sql server service broker?

548


How to convert a numeric expression from one data type to another?

510


Which sql server is best?

520


Can a cursor be updated? If yes, how you can protect which columns are updated?

524






What is indexing and its types?

532


How to view the error log for any specific instance? : sql server database administration

584


What are the different types of normalization?

629


What is the maximum length of an alert name?

606


What is autocommit mode in sql server?

549


What is the purpose of indexing?

600


What is the security principal at the database level that represents your session?

541


what is a transaction and what are acid properties? : Sql server database administration

531


What the class forname () does?

547


Can an entity have two primary keys?

533