Home New Posts Topics Members FAQ
Post your question to a community of 467,209 developers. It's quick & easy.
In db2 8.2, how do I limit a query resultset to x rows?
natG wrote: In db2 8.2, how do I limit a query resultset to x rows? ... FETCH FIRST xx ROWS ONLY Bernd
Bernd Hohmann wrote: natG wrote: 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/infoce...n/c0005280.htm Eric
Replies have been disabled for this discussion.