开发者

NHibernate or SQL Server 2005 Regarding Max Results

Is there a way to query Sql Server 2005 and return out of a 100 records. Records 10 - 20. In other words only 10 rows would be returned. Not the first 10 but the second 10 - 20.

I want to do this in TSQL. This would also be acceptable with NHibernate but ultimatley NHibernate would need to convert the HQL into TSQL. I know its possible to do this fro开发者_开发知识库m Linq but I want to know whether its possible from TSQL.

Oh btw. This is for optimization purpose. So just like you would return the Max 100 rows. You would return it for the same reason but a subset. Performance is the reason!!


Try:

http://www.sqlservercurry.com/2009/06/skip-and-take-n-number-of-records-in.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜