Writing Dynamic SQL
When you write dynamic SQL, you will often follow one or more of the approaches outlined below.
Task |
Approach |
---|---|
Run a non- |
Use EXECUTE IMMEDIATE. |
Run a dynamic |
Use EXECUTE IMMEDIATE with ECHO SELECT |
Run a dynamic |
Use COLLECT with a query type variable. |
Run a dynamic |
Use SCALAR with a |
Last modified: April 28, 2021