Text literals

Description

Use the text literal notation to specify values whenever string appears in the syntax of expressions, conditions, SQL functions, and SQL statements in other parts of this reference.

(Oracle SQL Language Reference Text literals)

[ {N | n} ]
{ '[ c ]...'
| { Q | q } 'quote_delimiter c [ c ]... quote_delimiter'
}

Sample Source Patterns

Empty string ('')

The empty strings are equivalent to NULL in Oracle, so in order to emulate the behavior in Snowflake, the empty strings are converted to NULL or undefined depending if the literal is used inside a procedure or not.

Oracle

IN -> Oracle_01.sql
SELECT UPPER('') FROM DUAL;

Snowflake

OUT -> Oracle_01.sql
SELECT UPPER(NULL) FROM DUAL;

Empty string in stored procedures

Oracle

Snowflake

Empty string in built-in functions

Oracle

Snowflake

If the empty strings are replaced by NULL for these cases, the results of the queries will be different.

Last updated