EXIT

Translation reference to convert Oracle EXIT statement to Snowflake Scripting

Important Notice: Migration of Documentation Website

Please be advised that our documentation website is currently undergoing a migration to a new platform. To ensure you have access to the most up-to-date information, we kindly request that you visit our new documentation website located at:

Official Snowflake Snowconvert Documentation

For any immediate assistance or if you encounter any issues, please contact our support team at [email protected].

Thank you for your understanding.

Some parts in the output code are omitted for clarity reasons.

Description

The EXIT statement exits the current iteration of a loop, either conditionally or unconditionally, and transfers control to the end of either the current loop or an enclosing labeled loop. (Oracle PL/SQL Language Reference EXIT Statement)

EXIT [ label ] [ WHEN boolean_expression ] ;
{ BREAK | EXIT } [ <label> ] ;

Sample Source Patterns

Note that you can change EXITwith BREAKand everything will work the same.

1. Simple Exit

Code skips the INSERT statement by using EXIT.

Oracle

Snowflake Scripting

2. Exit with condition

Code exits the loop when the iterator is greater than 5.

Oracle

Snowflake Scripting

3. Exit with label and condition

Code breaks both loops by using the EXIT statement pointing to the outer loop.

Note that labels are going to be commented out.

Oracle

Snowflake Scripting

Known Issues

No issues were found.

  1. SSC-EWI-0094: Label declaration not supported.

Last updated