You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
646 B
19 lines
646 B
DROP TABLE Voiture, Types, Client, Réservartion, Stock;
|
|
|
|
|
|
CREATE TABLE Réservartion (
|
|
|
|
N°permis numeric(12) CONSTRAINT CPRéservation PRIMARY KEY,
|
|
DateReservation date CONSTRAINT date2Réservation NOT NULL,
|
|
Forfait numeric(5,2) CONSTRAINT forfaitPrix CHECK (Forfait >= 500.00 AND Forfait > 0.00),
|
|
DateRetour date CONSTRAINT date2Retour CHECK (dateretour > DateReservation),
|
|
Durée numeric(2) CONSTRAINT PbDurée CHECK( (Durée <= 7 AND Durée >= 1) AND ),
|
|
PRIMARY KEY (nom)
|
|
|
|
);
|
|
|
|
CREATE TABLE Voiture(
|
|
immatriculation PRIMARY KEY CONSTRAINT Problème_Immatriculation CHECK(immatriculation LIKE '(A-Z)(A-Z)(0-9)(0-9)(0-9)(A-Z)(A-Z)')
|
|
)
|
|
|