1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| CREATE TABLE ARTICLE
(
ArticleId Int Not null,
ArticleReference Int Not null,
Designation Varchar(64) Not null,
DimCondMinId Int Not null,
SousFamilleId Int Not null,
UniteArtId Int Not null,
PrixAchatUnitaire Decimal(10,2) Not null,
Unite Char(8) Not null,
CoefMult Decimal(5,2) Not null,
PrixAchatCondMini Decimal(10,2) Not null,
Commentaires Varchar(200) Not null,
CONSTRAINT ARTICLE_PK PRIMARY KEY (ArticleId),
CONSTRAINT ARTICLE_AK UNIQUE (ArticleReference),
CONSTRAINT ARTICLE_DIM_COND_MIN_FK FOREIGN KEY (DimCondMinId)
REFERENCES DIM_COND_MIN (DimCondMinId),
CONSTRAINT ARTICLE_UNITE_ARTICLE_FK FOREIGN KEY (UniteArtId)
REFERENCES UNITE_ARTICLE (UniteArtId),
CONSTRAINT ARTICLE_SOUS_FAMILLE_FK FOREIGN KEY (SousFamilleId)
REFERENCES SOUS_FAMILLE (SousFamilleId)
) ; |
Partager