Assign

Description

Assigns a value to a variable.

Click here to navigate to the PostgreSQL documentation page for this syntax.

Grammar Syntax

VARIABLE NAME { = |:= } expr

Sample Source Patterns

Input

The only change required, is the following

VARIABLE_NAME = expr;
VARIABLE_NAME := expr;

VARIABLE_NAME := count(*);

Special cases

Postgresql allows a select body to be on the right-hand side of an assignment, without the SELECT keyword. Snowflake needs the whole select statement, and SnowConvert automatically adds the missing keyword and parenthesis.

Known Issues

No issues were found.

No related EWIs.

Last updated

Was this helpful?