Hello, I would like to learn from knowledgeable people in what and where lies the error in the syntax:

mysql> INSERT INTO 'transport' ('domain', 'transport') VALUES ('localhost.localdomain', 'virtual:'); 

The error of such content takes off:

ERROR 1064 (4200): You have an error in SQL syntax; check ... for the right syntax to use near 'transport' (... all too ...) '; at line 1.

OS CentOS 6.3-64, mysql-5.1.61-4; This is a snippet from the Postfix & Courier-Imap mail database.

  • And if 'transport' without quotes? - pyatak
  • It should be: mysql> INSERT INTO transport ( domain , transport ) VALUES ('localhost.localdomain', 'virtual:') it’s just not clear from your listing what quotes are. And yet, I could be wrong, but possible; not needed at the end. - andrey_sn
  • in the comment "ate" quotes (those that are above E). INSERT INTO transport (domain, transport) - andrey_sn

1 answer 1

leapfrog with quotes. around the lines must be either single ' or double " quotes, around the identifiers quotes are not needed in this case, but if we use them, then they must be" backward "quotes:

 ` 

in the given example, you can write this:

 INSERT INTO transport (domain, transport) VALUES ('localhost.localdomain', 'virtual:');