Open lovasoa opened 1 week ago
SQLite, Postgres, MsSQL and MySQL all support the CREATE TABLE table_name(columns) AS SELECT ....
CREATE TABLE table_name(columns) AS SELECT ...
However, MySQL (and Mariadb) allow omitting the AS keyword, and specifying a table like
AS
CREATE TABLE bar (m INT) SELECT n FROM foo;
Currently, sqlparser parses this as two distinct statements: a create table followed by a select. Instead, it should parse it the same as
CREATE TABLE bar (m INT) AS SELECT n FROM foo;
https://dev.mysql.com/doc/refman/8.4/en/create-table-select.html
SQLite, Postgres, MsSQL and MySQL all support the
CREATE TABLE table_name(columns) AS SELECT ...
.However, MySQL (and Mariadb) allow omitting the
AS
keyword, and specifying a table likeCurrently, sqlparser parses this as two distinct statements: a create table followed by a select. Instead, it should parse it the same as
https://dev.mysql.com/doc/refman/8.4/en/create-table-select.html