VALUES clause
In RisingWave, the VALUES
clause is used to generate one or more rows of data as a table expression. It is commonly used in SQL queries to create temporary tables or to insert data into a table.
The syntax of the VALUES
clause in RisingWave is as follows:
Here, each set of expressions enclosed in parentheses represents a row of data. The number of expressions must match the number of columns in the table or view being created.
When creating a view or materialized view, you can use the VALUES
clause to construct a temporary table and assign that table to the view or materialized view. For example:
The VALUES
clause can also be used in more complex queries, such as subqueries or joins, to generate temporary tables or insert data into existing tables. For example:
To see the values in join_mv
:
Was this page helpful?