nono

an anonymous user · January 26, 2023
CREATE TABLE Client
(NCl VARCHAR2(4) NOT NULL UNIQUE,
NomCl VARCHAR2(15),
AdrCl VARCHAR2(10));

CREATE TABLE Produit
(NP VARCHAR2(4) CONSTRAINT pk_NP PRIMARY KEY,
LibP VARCHAR2(15),
Coul VARCHAR2(10),
Poids NUMBER(6,3),
PU NUMBER(6,3) );
alter TABLE Produit add qtes NUMBER(5);


CREATE TABLE Commande
(NCmd VARCHAR2(4),
DateCmd DATE,
NCl VARCHAR2(4));

CREATE TABLE Ligne_Cmd
(NCmd VARCHAR2(4),
NP VARCHAR2(4),
Qte NUMBER(5),
CONSTRAINT pk_LCMD PRIMARY KEY (NCmd, NP),
CONSTRAINT fk_NP FOREIGN KEY (NP) REFERENCES Produit(NP));
Output
(Run the program to view its output)

Comments

Please sign up or log in to contribute to the discussion.