Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

How to drop an existing stored procedure in ms sql server?

965


Explain what stored procedure sp_replcounters is used for? : sql server replication

1455


What are the new features in sql server 2016?

930


You accidentally delete the msdb database what effect does this have on your existing sql databases, and how do you recover?

938


What are the differences between INNER JOIN, LEFT JOIN and RIGHT JOIN in SQL Server?

1061


Why it is recommended to avoid referencing a floating point column in the where clause?

922


How can we solve concurrency problems?

995


Explain system views?

1024


How global temporary tables are represented and its scope?

907


ow to bring suspect mode datbase online from scratch

1763


What is Fragmentation and Defragmentation? For 32GB Table,How can we do the fragmentation?

4299


what is a transaction? : Sql server database administration

935


How to remove duplicate rows from table?

1165


What are the benefits of filtered indexes?

977


what is the difference between writing data to mirrored drives versus raid5 drives. : Sql server administration

913