>> In db2 8.2, how do I limit a query resultset to x rows?
>
> ... FETCH FIRST xx ROWS ONLY
>
> Bernd
If you intend to use this often, against large tables, consider also using:
... OPTIMIZE FOR xx ROWS
There's a good overview in the section: Guidelines for restricting select statements at:
http://publib.boulder.ibm.com/infocenter/db2luw/v8/index.jsp?topic=/com.ibm.db2.
udb.doc/admin/c0005280.htm
Eric
natG - 30 Mar 2006 18:40 GMT
>>> In db2 8.2, how do I limit a query resultset to x rows?
>>
[quoted text clipped - 11 lines]
>
> Eric
Thank you much.
nat