653-21-guruh talabasi
|
Abdurazzaqova Mavjuda
|
ER-Diagramma
Manzili
Telefoni
bolimi
Lavozimi
sotuvchi
Tug’ilgan yili
Ishga kirgan
Shahri
Jinsi
Tajribasi
Ismi
Familiya
Sharifi
Xodimlar
Tovar sanasi
Rastalar soni
Bolim nomi
Telefon raqami
Tovar savdosi
Miqdori
Vaqti
Sotuvchilar soni
Zal raqami
Bo’limlar
Summasi
Narxi
MB-Supermarket axborot tizimi
Lavozimlar
Lavozim nomi
bolim
Tovarlar
s-sharoiti
s-muddati
Tovar nomi
Ich davlat
oyligi
mysql>create database mb_supermarket;
mysql> use mb_supermarket;
mysql> create table bolimlar
(ID_b int(7) primary key,
Bolim_ nomi varchar(25) not null;
Mysql> create table bolimlar
(ID_B int(7) primary key,
Bolim_nomi varchar(25) not null,
Rastalar_soni int(7) not null,
Sotuvchilar_soni int(7) not null,
Zal_raqami varchar(25) not null);
Query ok,0 rows affected(0.25sec)
Mysql> desc bolimlar;
mysql> alter table xodimlar
-> add column oilaviy_holi varchar(50) not null;
Query OK, 0 rows affected (0.35 sec)
Records: 0 Duplicates: 0 Warnings: 0
mysql> desc xodimlar;
mysql> alter table xodimlar
-> modify oilaviy_holi varchar(30) not null;
Query OK, 0 rows affected (0.34 sec)
Records: 0 Duplicates: 0 Warnings: 0
mysql> alter table xodimlar
-> change column oilaviy_holi oilaviy_sharoiti varchar(30) not null;
Query OK, 0 rows affected (0.34 sec)
Records: 0 Duplicates: 0 Warnings: 0
mysql> alter table xodimlar
-> rename to xodimlari;
Query OK, 0 rows affected (0.13 sec)
mysql> alter table xodimlar
-> drop oilaviy_sharoiti;
ERROR 1146 (42S02): Table 'mb_supermarket.xodimlar' doesn't exist
mysql> alter table xodimlari
-> drop oilaviy_sharoiti;
Query OK, 0 rows affected (0.32 sec)
Records: 0 Duplicates: 0 Warnings: 0
mysql> desc xodimlari;
mysql> insert into xodimlari
-> values(1,'Saidova','Gulyuz','akmalovna','boshqaruv','1985-12-31','2010-01-21','2010-01-22','Direktor','ayol','Uchqurgon birlik MFY 3','Namangan','945550222'),
-> (2,'Toxirova','Saida','Ganiyevna','boshqaruv','1990-02-12','2011-02-20','2011-02-21','ish boshqaruvchi','ayol','Pop tumani sohil MFY 45','Namangan','954440444');
Query OK, 2 rows affected (0.15 sec)
Records: 2 Duplicates: 0 Warnings: 0
mysql> select familyasi,bolimi from xodimlari;
mysql> update xodimlari
-> set familyasi='Ismoilova'
-> where id_x=3;
Query OK, 1 row affected (0.16 sec)
mysql> select * from xodimlari
-> where id_x=4;
mysql> select * from xodimlari;
mysql> delete from xodimlari
-> where id_x=3;
Query OK, 1 row affected (0.13 sec)
mysql> select * from xodimlari;
Do'stlaringiz bilan baham: |