TP 1
TP 1
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| test |
+--------------------+
3 rows in set (0.00 sec)
nomp' at line 2
mysql> create table produit(
-> idproduit int not null AUTO-INCREMENT,
-> nomproduit varchar(50) not null,
-> prixproduit int not null,
-> fabriquant varchar(100),
-> primary key (idproduit)
-> );
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 'AUTO-
INCREMENT,
nomproduit varchar(50) not null,
prixproduit int not null,
fabri' at line 2
mysql> create table produit(
-> idproduit int not null AUTO_INCREMENT,
-> nomproduit varchar(50) not null,
-> prixproduit int not null,
-> fabriquant varchar(100),
-> primary key (idproduit)
-> );
Query OK, 0 rows affected (0.22 sec)
mysql> notee
mysql> show tables;
ERROR 1046 (3D000): No database selected
mysql> use boutique
Database changed
mysql> show tables;
+--------------------+
| Tables_in_boutique |
+--------------------+
| client |
| commande |
| produit |
+--------------------+
3 rows in set (0.20 sec)
mysql>
mysql>
mysql> #inser insert into client(781763770, "mamadou", "diouf", "mbour")
mysql> values
-> ;
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 'values'
at line 1
mysql> insert into client(781763770, "mamadou", "diouf", "mbour");
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
'781763770, "mamadou", "diouf", "mbour")' at line 1
mysql> insert into client(781763770, 'mamadou', 'diouf', 'mbour');
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
'781763770, 'mamadou', 'diouf', 'mbour')' at line 1
mysql> insert into client values (781763770, 'mamadou', 'diouf', 'mbour');
Query OK, 1 row affected (0.18 sec)