Values
Description
Produces an inline temporary table for use within the query. (Databricks SQL Language Reference VALUES)
In the SELECT statement, the VALUES sub-clause of the FROM clause allows the specification of a set of constants to be used to form a finite set of rows. (Snowflake SQL Language Reference VALUES)
Syntax
VALUES {expression | ( expression [, ...] ) } [, ...] [table_alias]
SELECT expression [, ...] [table_alias]SELECT ...
FROM ( VALUES ( <expr> [ , <expr> [ , ... ] ] ) [ , ( ... ) ] ) [ [ AS ] <table_alias> [ ( <column_alias> [, ... ] ) ] ]
[ ... ]Sample Source Patterns
Setup data
Databricks
CREATE TEMPORARY VIEW number1(c) AS VALUES (3), (1), (2), (2), (3), (4);Snowflake
CREATE TEMPORARY TABLE number1(c int);
INSERT INTO number1 VALUES (3), (1), (2), (2), (3), (4);Pattern code
Databricks
c
3
1
2
4
Snowflake
c
3
1
2
4
Known Issues
No issues were found
Related EWIs
No related EWIs
Last updated
Was this helpful?