VALUES

constructsupportedQueries & DML

docs.snowflake.com ↗

In the SELECT statement, the VALUES subclause of the FROM clause lets you specify a set of constants to form a finite set of rows. For information about the VALUES clause in the INSERT statement, see the documentation for the INSERT statement.

Syntax

SELECT ...
FROM ( VALUES ( <expr> [ , <expr> [ , ... ] ] ) [ , ( ... ) ] )
  [ [ AS ] <table_alias> [ ( <column_alias> [ , ... ] ) ] ]
[ ... ]

Parameters

NameRequiredDescription
exprEach expression must be a constant, or an expression that can be evaluated as a constant during compilation of the SQL statement. Most simple arithmetic expressions and string functions can be evaluated at compile time, but most other expressions can’t.
table_aliasAn optional alias to give the set of rows a name, as though the set of rows were a table.
column_aliasOptional column aliases can specify the columns names.

Usage notes

Parameters

expr: Each expression must be a constant, or an expression that can be evaluated as a constant during compilation of the SQL statement. Most simple arithmetic expressions and string functions can be evaluated at compile time, but most other expressions can’t. table_alias: An optional alias to give the set of rows a name, as though the set of rows were a table. column_alias: Optional column aliases can specify the columns names.