-1
INSERT INTO 'test' ('name', 'remark') VALUES ('133', '4545')

Tabke 'test' is existing and name id varchar(14), remark is varchar(140). It's always cause error:

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 ''test' ('name', 'remark') VALUES ('133', '4545')' at line 1

Rajdeep Paul
  • 16,887
  • 3
  • 18
  • 37
Cstom
  • 9
  • 2

2 Answers2

1

Table and column names should be wrapped with backticks, not single quotes.

INSERT INTO `test` (`name`, `remark`) VALUES ('133', '4545')
Rajdeep Paul
  • 16,887
  • 3
  • 18
  • 37
0

Change

INSERT INTO 'test' ('name', 'remark') VALUES ('133', '4545')

To

INSERT INTO `test` (`name`, `remark`) VALUES ('133', '4545')

Remove single quote with backtick

INSERT INTO `test` (`name`, `remark`) VALUES ('133', '4545')
Nana Partykar
  • 10,556
  • 10
  • 48
  • 77