· 8 years ago · Apr 10, 2018, 09:32 AM
11.
2show tables;
3
42.
5describe produkty;
6select * from produkty;
7
83.
9select ID_produktu, Cena_produktu
10from produkty
11where Cena_produktu BETWEEN 2 and 5;
12
134.
14create table if not exists Klienci_1 (
15 imiÄ™ varchar(30) not null,
16 nazwisko varchar(30) not null,
17 adres varchar(50) not null
18);
195.
20RENAME TABLE dostawcy to Producenci;
21
226.
23ALTER table klienci
24add rocznik int(5) not null;
25
267.
27alter table klienci
28drop COLUMN rocznik;
29
308,9.
31CREATE TABLE Produkty_1 SELECT * FROM produkty;
32
3310.
34insert into klienci
35values ('9', 'Krzysztof', 'Palka', 'Warzywna 18', '112', 'zyd@gov.pl');
36
3711.
38insert into klienci
39values ('9', 'Krzysztof', 'Palka', 'Warzywna 18', '112', 'zyd@gov.pl');
40insert into klienci
41values ('10', 'Krzysztof', 'Pralka', 'Warzywnie 18', '114', 'zydz@gov.pl');
42
4312.
44select Nazwisko
45from klienci
46where imie="Jan";
47
4813.
49select Nazwa_Produktu, Opis_produktu
50from produkty
51where ID_Produktu in (2,5);
52
5314.
54select Nazwisko
55from klienci
56where Nazwisko='%ski%';
57
5815.
59select Nazwisko
60from klienci
61where EMail is null;
62
6316.
64select MIN(Cena_produktu) as Cena_najmniejsza, MAX(Cena_produktu) as Cena_najwyzsza
65from produkty;
66
6717.
68select *
69from klienci
70where Nazwisko="kowalski";
71
7218.
73select Nazwa_Produktu
74from produkty
75where Opis_produktu='%kolorowy%'