1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
| Create database GestionVente
use GestionVente
create table client(
numClient int identity primary key,
nom varchar(Max),
adresse varchar(Max),
ville varchar(Max),
tele varchar(Max),
login varchar(Max),
pass varchar(Max),
)
create table Article(
numArticle int identity primary key,
designation varchar(Max),
pu float,
)
create table commande(
numCmd int primary key identity,
dates date,
numClient int foreign key references client(numClient) on update cascade on delete cascade ,
numArticle int foreign key references article(numArticle) on update cascade on delete cascade,
qteArticle int,
)
insert into Article values ('Clavier',70)
insert into Article values ('Souris',50)
insert into Article values ('Ecran',900)
insert into Article values ('Unité centrale',6000) |
Partager