I'm using MySQL 5.6.33.
My table definition is:
CREATE TABLE test (
id int(11) NOT NULL AUTO_INCREMENT,
a1 varchar(255) NOT NULL,
a2 varchar(255) NOT NULL,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
INSERT
INSERT INTO test ('a1', 'a2') VALUES ('hello', 'world');
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''a1', 'a2') VALUES('hello', 'world')' at line 1
INSERT INTO test ('id', 'a1', 'a2') VALUES (NULL,'hello', 'world');
Your are not suppose to use '
single-quote in with column name
INSERT INTO test ('a1', 'a2') VALUES ('hello', 'world');
instead
INSERT INTO test (a1, a2) VALUES ('hello', 'world');