Closed arvidfm closed 3 months ago
Hey @arvidfm, fix for this is making its way to dolt main.
We support the syntax listed in this issue, but we are missing the case for SELECT (VALUES ...)
.
Additionally, our VALUES
constructor is more lenient than MySQL's (part of having some compatibility with PostgreSQL), so the ROW
is not required.
For example:
tmp/main*> values (1, 2, 3), (4, 5, 6);
+----------+----------+----------+
| column_0 | column_1 | column_2 |
+----------+----------+----------+
| 1 | 2 | 3 |
| 4 | 5 | 6 |
+----------+----------+----------+
2 rows in set (0.00 sec)
Expect a release later today.
MySQL allows for using
VALUES ROW(...), ROW(...), ...;
as a standalone statement for generating a multi-row table, where the columns will have the namescolumn_0
,column_1
, etc:This is not currently available in Dolt:
However, Dolt does support the syntax in subqueries, e.g. as a table reference in a
JOIN
statement, and it's unclear how much value the ability to use it as a standalone statement would bring.If you really need to generate a table using inline data with no further processing, a simple workaround is to use it as a subquery in a
SELECT
statement: