Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Product Manuals » ElevateDB Version 2 SQL Manual » SQL/PSM Statements » LOOP |
[Label:] LOOP <StatementBlock> END LOOP [Label]; <StatementBlock> = <StatementBlock> = [[Label:] BEGIN] [<Statement>;] [<Statement>;] [EXCEPTION] [<Statement>;] [END [Label];]
-- This procedure loops through -- the Customers table and exits the loop -- when the EOF is reached on the cursor CREATE PROCEDURE LoopCustomers() BEGIN DECLARE CustCursor SENSITIVE CURSOR FOR Stmt; PREPARE Stmt FROM 'SELECT * FROM Customer'; OPEN CustCursor; FETCH FIRST FROM CustCursor; LOOP IF EOF(CustCursor) THEN LEAVE; ELSE FETCH NEXT FROM CustCursor; END IF; END LOOP; END
Deviation | Details |
None |
This web page was last updated on Thursday, November 16, 2023 at 10:39 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |