REPEAT - ENDREPEAT Example¶
In the following REPEAT - ENDREPEAT statement example, this database procedure, delete_n_rows, accepts as input a base number and a number of rows. The specified rows are deleted from the table βtab,β starting from the base number. Because this is a repeat loop, one row will always be deleted. If it is possible for no rows to be identified, the pre-testing WHILE - ENDWHILE loop should be used instead. If an error occurs, the loop terminates: