dataengref migrate

Home / Oracle

Oracle DUAL in Snowflake, Databricks and BigQuery

All three targets allow SELECT without a FROM clause, so FROM DUAL can simply be removed. That is the documented form in each of them.

Oracle syntax: SELECT expr FROM DUAL · Oracle docs

Equivalents

TargetSupportSyntaxNotesSource
SnowflakeRewriteSELECT exprThe FROM clause is optional. DUAL is not described in the Snowflake SQL reference, so do not rely on it.Snowflake docs
DatabricksRewriteSELECT exprThe FROM clause is optional in a SELECT.Databricks docs
BigQueryRewriteSELECT exprA SELECT without FROM returns one row.BigQuery docs

Behavior differences to check

Examples

Evaluate an expression

Oracle
SELECT UPPER('abc') FROM DUAL;
Snowflake
SELECT UPPER('abc');
Databricks
SELECT upper('abc');
BigQuery
SELECT UPPER('abc');

Other Oracle functions

Last checked: · Paste a whole query into the SQL checker to find every function that needs a change.