Set

circle-exclamation

Description

The SET command sets a system variable to alter the SQL*Plus environment settings for your current session. (Oracle SQL Plus User's Guide and Referencearrow-up-right)

SET system_variable value
!set <option>=<value>
circle-info

Snowflake recommends not adding whitespace in the variable value assignment statement.

1. Set with simple variable assignment

circle-check

The SET command is replaced by the !setarrow-up-right command.

Oracle

SET wrap on

SnowSQL (CLI Client)

!set wrap=true

2. Define without variable assignments

circle-exclamation

Oracle allows bypassing the key-value rule for assigning values to system variables with a numeric domain, assigning the value of 0 by default in such cases. In Snowflake this is not allowed, so an alternative is to set the value of 0 to a said variable explicitly.

Oracle

SnowSQL (CLI Client)

Known Issues

1. Predefined variables

The SET command only works for system variables, which may differ in quantity, name, or domain between the two languages, so a review should be done on the variable being used within the command to find its correct Snowflake equivalence. To see the list of system variables in Oracle you can use the command SHOW ALL whereas in Snowflake you can use !optionsarrow-up-right.

No related EWIs.

Last updated

Was this helpful?