Obviously you can limit the amount fo rows returned by using WHERE clauses. But if you only want the first 5 rows, when 100 satisfy the WHERE clauses, then you can code:
FETCH FIRST 5 ROW ONLY
to the select statement. After 5 rows have been obtained (or however many you need) an SQLCODE of 100 will be returned.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.