Syntax for flow control statements

To loop through data in a stored procedure with LOOP, you can use the following sample syntax: 

[beginlabel:] LOOP
sql statements
END LOOP [endlabel];

To loop through data in a stored procedure with REPEAT, you can use the following sample syntax:

[beginlabel:] REPEAT
sql statements
UNTIL condition
END REPEAT [endlabel]

To loop through data in a stored procedure with WHILE, you can use the following sample syntax:

[beginlabel:] 
WHILE condition DO
sql statements
END WHILE
[end_label]
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.240.222