Oracle (FOREIGN KEY+ création d'une table)
Rigolus
-
yan -
yan -
J'ai déjà créé les tables nationalité et situation matrimoniale. Au moment de l'exécution de cette commande, il signale une erreur au niveau de CodeNat (dans la clause Foreign key). Quel est le pb?Merçi d'avance.
create table Professeur (
MatriProf varchar2(8) unique not null,
NomProf varchar2(25) not null,
PrenomProf varchar2(25) not null,
SexeProf varchar2(1) not null,
BPProf varchar2(5),
VilleProf varchar2(15),
TelDomProf varchar2(8),
TelCellProf varchar2(8),
TelBurProf varchar2(8),
EmailProf varchar2(21),
Observation varchar2(30),
constraint cstProf primary key (MatriProf),
constraint cstProfNat FOREIGN KEY (CodeNat) REFERENCES Nationalite (CodeNat),
constraint cstProfSitMat FOREIGN KEY (CodeSitMat) REFERENCES SituationMat (CodeSitMat)
);
create table Professeur (
MatriProf varchar2(8) unique not null,
NomProf varchar2(25) not null,
PrenomProf varchar2(25) not null,
SexeProf varchar2(1) not null,
BPProf varchar2(5),
VilleProf varchar2(15),
TelDomProf varchar2(8),
TelCellProf varchar2(8),
TelBurProf varchar2(8),
EmailProf varchar2(21),
Observation varchar2(30),
constraint cstProf primary key (MatriProf),
constraint cstProfNat FOREIGN KEY (CodeNat) REFERENCES Nationalite (CodeNat),
constraint cstProfSitMat FOREIGN KEY (CodeSitMat) REFERENCES SituationMat (CodeSitMat)
);
A voir également:
- Oracle (FOREIGN KEY+ création d'une table)
- Table ascii - Guide
- Table des matières word - Guide
- Key windows 10 - Guide
- Creation compte gmail - Guide
- Création site web - Guide