开发者

Firebird rownum *or* linq style skip and take

开发者 https://www.devze.com 2023-03-21 07:53 出处:网络
I\'m using firebird database and it does not seem to have ROWNUM or ROW_NUMBER() like sql server does so I cannot follow the procedure explained here.

I'm using firebird database and it does not seem to have ROWNUM or ROW_NUMBER() like sql server does so I cannot follow the procedure explained here.

I have a query whose result dataset is bigger than what my system memory can accommodate. I'm trying load the dataset in smaller chunks. I have a series of generic queries which I cannot modify and they could be anything. I know I can do

开发者_JAVA百科
select first 5000 * from
(-my actual query here-)

to get the first 5000 records. But how can I go about getting the next 5000 records.

Thanks


Since FireBird 2.0 ROWS syntax is supported, ie you would use

select * from tab ROWS m TO n

I suggest you download FB's language reference update where it is documented.


In firebird you use Select First ? Skip ? to specific how many, and what your offset is.

0

精彩评论

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