dataengref migrate

Home / Oracle

Oracle SYSDATE in Snowflake, Databricks and BigQuery

Snowflake has SYSDATE() but it returns a UTC TIMESTAMP_NTZ and needs parentheses. Databricks and BigQuery have no SYSDATE; use current_timestamp() or CURRENT_DATETIME(). For a date without time, use CURRENT_DATE in all three.

Oracle function: SYSDATE · Oracle docs

Equivalents

TargetSupportSyntaxNotesSource
SnowflakeSame nameSYSDATE()Returns TIMESTAMP_NTZ in UTC, not a DATE. Parentheses are required. CURRENT_TIMESTAMP returns local session time instead.Snowflake docs
DatabricksRewritecurrent_timestamp()getdate() and now() are synonyms. Use current_date() for the date only.Databricks docs
BigQueryRewriteCURRENT_DATETIME([time_zone])DATETIME in UTC unless a time zone is passed. Use CURRENT_DATE() for the date only.BigQuery docs

Behavior differences to check

Snowflake

Examples

Orders placed in the last day

Oracle
SELECT * FROM orders WHERE ordered_at >= SYSDATE - 1;
Snowflake
SELECT * FROM orders WHERE ordered_at >= DATEADD(day, -1, SYSDATE());
Databricks
SELECT * FROM orders WHERE ordered_at >= current_timestamp() - INTERVAL 1 DAY;
BigQuery
SELECT * FROM orders WHERE ordered_at >= DATETIME_SUB(CURRENT_DATETIME(), INTERVAL 1 DAY);

Other Oracle functions

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