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
How to drop an existing stored procedure in ms sql server?
Explain what stored procedure sp_replcounters is used for? : sql server replication
What are the new features in sql server 2016?
You accidentally delete the msdb database what effect does this have on your existing sql databases, and how do you recover?
What are the differences between INNER JOIN, LEFT JOIN and RIGHT JOIN in SQL Server?
Why it is recommended to avoid referencing a floating point column in the where clause?
How can we solve concurrency problems?
Explain system views?
How global temporary tables are represented and its scope?
ow to bring suspect mode datbase online from scratch
What is Fragmentation and Defragmentation? For 32GB Table,How can we do the fragmentation?
what is a transaction? : Sql server database administration
How to remove duplicate rows from table?
What are the benefits of filtered indexes?
what is the difference between writing data to mirrored drives versus raid5 drives. : Sql server administration