FETCH FIRST 1 ROW ONLY
search cancel

FETCH FIRST 1 ROW ONLY

book

Article ID: 123040

calendar_today

Updated On: 05-13-2025

Products

Gen Gen - Workstation Toolset Gen - Host Encyclopedia Gen - Run Time Distributed

Issue/Introduction

Can CA Gen toolset generate SQL code with 'FETCH FIRST 1 ROW ONLY'?  If so, how is it coded?

Environment

z/OS DB2
Windows Toolset

Resolution

Setting the property "Limit to N row" on the READ EACH and setting the value to 1 will generate FETCH FIRST 1 ROW ONLY.  Generation target must be for COBOL and DB2.  Other platform targets will not generate this SQL.