Problem solve Get help with specific problems with your technologies, process and projects.

Illegal keyword in FETCH FIRST n ROW ONLY

What version of DB2 is required to use the FETCH FIRST n ROWS ONLY? I am working on a v6.1 database on OS/390 and getting an error: "Illegal keyword". Are there any other methods to fetch only the first few rows?

DB2 Version 7 is required in order to use FETCH FIRST n ROW ONLY. Unfortunately, the only way to limit the number...

of rows fetched prior to V7 is to manually count in your program.

This was last published in October 2002

Dig Deeper on IBM DB2 management

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.