Professional Documents
Culture Documents
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
mysql> drop database compagnie_aerienne if exists;
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 'if
exists' at line 1
mysql> drop database compagnie_aerienne if exist;
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 'if
exist' at line 1
mysql> drop database compagnie_aerienne if not exist;
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 'if not
exist' at line 1
mysql> drop database compagnie_aerienne;
Query OK, 2 rows affected (3.78 sec)
mysql> create table pilote(id_p int(10) not null primary key auto_increment, nom_p
varchar(30) not null, insert into avion values (100,'AIRBUS',300,'RABAT');
Query OK, 1 row affected (0.07 sec)
mysql> create table vol(num_v int(10) not null primary key auto_increment, num_p
int(10) not null, num_a int(10) not null, vd varchar(100) not null, va varchar(100)
not null, hd datetime not null, ha datetime not null, constraint fk_nom_p foreign
key(num_p) references pilote(id_p), constraint fk_nom_a foreign key(num_a)
references avion(id_a)) engine=innodb;
Query OK, 0 rows affected (0.21 sec)