Bases de Donnees Create Table Add Change
Bases de Donnees Create Table Add Change
1706]
(c) Microsoft Corporation. Tous droits réservés.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [bdd_uam2022]> alter table matiere add nbrecredit varchar(20) after Date;
Query OK, 0 rows affected (0.012 sec)
Records: 0 Duplicates: 0 Warnings: 0
MariaDB [bdd_uam2022]> alter table prof add Dernier_Diplome varchar(50) not null
after specialite;
Query OK, 0 rows affected (0.009 sec)
Records: 0 Duplicates: 0 Warnings: 0
MariaDB [bdd_uam2022]> alter table classe add constraint check(0 < NbreEtudiants <
100);
Query OK, 0 rows affected (0.051 sec)
Records: 0 Duplicates: 0 Warnings: 0
MariaDB [bdd_uam2022]> alter table prof add Promotion varchar(50) not null;
Query OK, 0 rows affected (0.011 sec)
Records: 0 Duplicates: 0 Warnings: 0
MariaDB [bdd_uam2022]> alter table classe add Promotion varchar(50) not null;
Query OK, 0 rows affected (0.010 sec)
Records: 0 Duplicates: 0 Warnings: 0
MariaDB [bdd_uam2022]> alter table prof add id_personne varchar(50) not null;
Query OK, 0 rows affected (0.013 sec)
Records: 0 Duplicates: 0 Warnings: 0
MariaDB [bdd_uam2022]> desc etudiant;
+---------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------------+-------------+------+-----+---------+-------+
| id_Etudiant | varchar(50) | NO | PRI | NULL | |
| codePermanent | varchar(50) | YES | UNI | NULL | |
| sexe | char(5) | YES | | NULL | |
| LyceeOrigine | varchar(50) | YES | | NULL | |
| DateNaissance | datetime | YES | | NULL | |
+---------------+-------------+------+-----+---------+-------+
5 rows in set (0.009 sec)
MariaDB [bdd_uam2022]> alter table etudiant add id_personne varchar(50) not null;
Query OK, 0 rows affected (0.010 sec)
Records: 0 Duplicates: 0 Warnings: 0
MariaDB [bdd_uam2022]> alter table matiere add idprof varchar(50) not null;
Query OK, 0 rows affected (0.010 sec)
Records: 0 Duplicates: 0 Warnings: 0
MariaDB [bdd_uam2022]> alter table matiere add id_classe varchar(50) not null;
Query OK, 0 rows affected (0.010 sec)
Records: 0 Duplicates: 0 Warnings: 0
MariaDB [bdd_uam2022]> alter table etudiant add id_classe varchar(50) not null;
Query OK, 0 rows affected (0.010 sec)
Records: 0 Duplicates: 0 Warnings: 0
MariaDB [bdd_uam2022]> alter table classe add id_filiere varchar(50) not null;
Query OK, 0 rows affected (0.011 sec)
Records: 0 Duplicates: 0 Warnings: 0
MariaDB [bdd_uam2022]> alter table filiere add id_ecole varchar(50) not null;
Query OK, 0 rows affected (0.010 sec)
Records: 0 Duplicates: 0 Warnings: 0
MariaDB [bdd_uam2022]>