Professional Documents
Culture Documents
Database changed
ERROR 1064 (42000): 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 '' at
line 1
ERROR 1064 (42000): 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
'database' at line 1
+--------------------+
| Database |
+--------------------+
| agencevoyage |
| agencevoyage1 |
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+
Database changed
mysql> CREATE TABLE commune (
ERROR 1064 (42000): 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 'CREATE
TABLE commune (idcommune INT PRIMARY KEY,nom VARCHAR(50))' at line 4
mysql> CREATE TABLE commune (idcommune INT PRIMARY KEY,nom VARCHAR(50) not null);
mysql> INSERT INTO commune (idcommune, nom) VALUES (1, 'Paris'),(2, 'Lyon');
mysql> CREATE TABLE quartier (idquartier INT PRIMARY KEY,nom VARCHAR(50) not
null,commune_idcommune INT, FOREIGN KEY (commune_idcommune) REFERENCES
commune(idcommune));
ERROR 1452 (23000): Cannot add or update a child row: a foreign key constraint
fails (`agencevoyage1`.`logement`, CONSTRAINT `logement_ibfk_2` FOREIGN KEY
(`type_logement_idtype_logement`) REFERENCES `type_logement` (`idType_logement`))
ERROR 1064 (42000): 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 'INTO
logement_option (logement_idlogement, option_idoption) VALUES(1, 1),(1, 2),' at
line 2
ERROR 1064 (42000): 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 '4,4)' at
line 1
ERROR 1064 (42000): 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 '4,2)' at
line 1
mysql> ^C
+-------------------------+
| Tables_in_agencevoyage1 |
+-------------------------+
| commune |
| logement |
| logement_option |
| option_logement |
| quartier |
| type_logement |
+-------------------------+
+-----------+-------------+------+-----+---------+-------+
+-----------+-------------+------+-----+---------+-------+
+-----------+-------------+------+-----+---------+-------+
+-------------------------------+--------------+------+-----+---------+-------+
+-------------------------------+--------------+------+-----+---------+-------+
+-------------------------------+--------------+------+-----+---------+-------+
mysql> ^C
mysql>