Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- create table if not exists Klient
- (
- id_klient integer PRIMARY KEY,
- imie text not null,
- nazwisko text not null,
- email text not null,
- telefon integer not null,
- adres text not null,
- kod_pocztowy text not null
- );
- create table if not exists Produkt
- (
- id_produkt integer PRIMARY KEY,
- nazwa text not null,
- cena money not null,
- ilosc_magazyn integer not null
- );
- create table if not exists Zamowienie
- (
- id_zamowienie integer PRIMARY KEY,
- klientID integer not null,
- data_zam date not null,
- data_wys date not null,
- status text not null,
- koszykID integer not null
- );
- create table if not exists Koszyk
- (
- id_koszyk integer PRIMARY KEY,
- ilosc integer not null,
- produktID integer not null
- );
- INSERT INTO Klient (id_klient, imie, nazwisko, email, telefon, adres, kod_pocztowy)
- VALUES ('1','Jan','Pawlik','janpaw@gmail.com',666333666,'Lodz ul.Gdanska 14','91-002'),
- ('2','Adam','Kowalski','adkowa@gmail.com',123123123,'Lodz ul.Pomorska 20','92-024'),
- ('3','Wiktoria','Kozieł','wikko@gmail.com',345123678,'Radom ul.Owocowa 18','89-023'),
- ('4','Zuzanna','Lewandowska','zuzalewa@gmail.com',678243756,'Sosnowiec ul.Smutna 13','66-333'),
- ('5','Robert','Witkowski','robwit@gmail.com',421543876,'Szczecin ul.Zamkowa 6','23-543');
- INSERT INTO Produkt (id_produkt, nazwa, cena, ilosc_magazyn)
- VALUES ('1','Witaminy',39.99,50),
- ('2','Leki',14.99,30),
- ('3','Ziola',49.99,10),
- ('4','Zele',16.49,12),
- ('5','Syropy',24.49,8);
- INSERT INTO Zamowienie (id_zamowienie, klientid, data_zam, data_wys, status, koszykid)
- VALUES ('1','3','1/2/2018','1/4/2018','Wyslane','3'),
- ('2','4','10/1/2018','12/1/2018','Kompletowanie zamowienia','4'),
- ('3','5','5/1/2018','7/1/2018','Wyslane','5'),
- ('4','1','2/1/2018','4/1/2018','Wyslane','2'),
- ('5','2','8/1/2018','10/1/2018','Wyslane','1');
- INSERT INTO Koszyk (id_koszyk, ilosc, produktid)
- VALUES ('1','2','3'),
- ('2','3','2'),
- ('3','5','1'),
- ('4','2','5'),
- ('5','3','4');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement