Flow control in Oracle

Oracle has IF/ELSE, CASE, and LOOP and WHILE statements for flow control options.

The LOOP statement in Oracle is similar to the REPEAT statement in MySQL and uses the following syntax: 

[label]
LOOP
sql statements go here;
EXIT [label] WHEN condition;
END LOOP;

The WHILE statement in Oracle, which is very similar to the WHILE statement in MySQL, uses the following syntax: 

[label]
WHILE condition LOOP
sql statements go here;
END LOOP [label];

For more information about Oracle flow control, take a look at the Further reading section. 

..................Content has been hidden....................

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