Skip to content

Commit 09c7b27

Browse files
authored
[MySql] Allow empty column list in INSERT (#3813)
1 parent 919924e commit 09c7b27

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

sql/mysql/Positive-Technologies/MySqlParser.g4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -838,7 +838,7 @@ insertStatement
838838
IGNORE? INTO? tableName
839839
(PARTITION '(' partitions=uidList? ')' )?
840840
(
841-
('(' columns=fullColumnNameList ')')? insertStatementValue (AS? uid)?
841+
('(' columns=fullColumnNameList? ')')? insertStatementValue (AS? uid)?
842842
| SET
843843
setFirst=updatedElement
844844
(',' setElements+=updatedElement)*

sql/mysql/Positive-Technologies/examples/dml_insert.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ SELECT * FROM f3p1 WHERE 1;
2323
#begin
2424
-- insert base syntax
2525
insert ignore into t1(col1, col2, col3) values ('abc', 0, .12), ('adfasdf',23432, -.12);
26+
INSERT INTO test_auto_inc () VALUES ();
2627
-- http://dev.mysql.com/doc/refman/5.6/en/insert.html
2728
INSERT INTO tbl_name (col1,col2) VALUES(col2*2, 15);
2829
INSERT INTO tbl_name (col1,col2) VALUES(15,col1*2);

0 commit comments

Comments
 (0)