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
there is a trigger defined for insert operations on a table, in an oltp system. The trigger is written to instantiate a com object and pass the newly inserted rows to it for some custom processing. What do you think of this implementation? Can this be implemented better? : Sql server database administration
How to specify the collation for a character data type in ms sql server?
How do you send email on SQL Server?
Do you know what is fill factor and pad index?
Explain the cursor lock types?
Show Practically Sql Server Views are updatable?
How do you make a trace?
What does it mean to be in union?
What is the meaning of lock escalation and why/how to stop this? : sql server database administration
Name few endpoints exposed by ssrs 2012?
How to change the ownership of a schema in ms sql server?
In what sequence sql statement is processed?
What are the different acid properties?
Give me any three differences between Truncate and Delete.
How will you go about resolving deadlocks?