avtosalon bazasi yaratilishi

PDF 12 pages 928.3 KB Free download

Page preview (5 pages)

Scroll down 👇
1 / 12
1-topshiriq mohiyat aloqa diagrammasi mavzu : avtosalon 1.avtosalon bazani yaratib olamiz mysql> create database avtosalon; query ok, 1 row affected (0.01 sec) natijasi: 2.yaratgan bazani ko’rib va uni tanlab olamiz so’rov: show databases; so’rov: mysql> use avtosalon; database changed natijasi: 3.create table table name buyrugi ostida jadvallarimizni yaratib olamiz: so’rov: mysql> create table xodim( -> id int auto_increment primary key, -> ism char(50), -> fam char(50), -> ota_ismi char(50), -> tajribasi char(50), -> ish_haqi varchar(50)); query ok, 0 rows affected (0.02 sec) mysql> create table markasi( -> id int auto_increment primary key, -> tovar_nomi char(50), -> davlat char(50), -> zavod_ishlab_chiqaruvchi char(50), -> manzili varchar(50)); query ok, 0 rows affected (0.01 sec) mysql> create table avtomobil( -> id int auto_increment primary key, -> nomi char(50), -> tovar varchar(50), -> yili_chiqqan date, -> rangi varchar(20), -> narxi int); query ok, 0 rows affected (0.02 sec) mysql> alter table avtomobil - > add …
2 / 12
column xaridor_id int, -> add foreign key (xaridor_id) references xaridor(id); query ok, 0 rows affected (0.02 sec) records: 0 duplicates: 0 warnings: 0 natijasi: 4.insert into buyrug’i asosida malumotlar qushamiz so’rov mysql> insert into xaridor (ism, fam, ota_ismi, pasport_malumotlari, manzili, yoshi, jinsi) -> values ('john', 'doe', 'doe sr.', 'ab123456', '123 main st', '30', 'male'), -> ('alice', 'smith', 'smith sr.', 'cd987654', '456 elm st', '28', 'female'); query ok, 2 rows affected (0.00 sec) records: 2 duplicates: 0 warnings: 0 mysql> insert into markasi (tovar_nomi, davlat, zavod_ishlab_chiqaruvchi, manzili) -> values ('toyota', 'japan', 'toyota motors', 'tokyo'), -> ('bmw', 'germany', 'bmw ag', 'munich'); query ok, 2 rows affected (0.00 sec) records: 2 duplicates: 0 warnings: 0 mysql> insert into avtomobil (nomi, tovar, yili_chiqqan, rangi, narxi, markasi_id) -> values ('corolla', 'toyota', '2020-01-01', 'red', 25000, 1), -> ('x5', 'bmw', '2019-12-01', 'black', 35000, 2); query ok, 2 rows affected (0.00 sec) records: 2 duplicates: 0 warnings: 0 …
3 / 12
motlar ustida amallar so’rov: mysql> select*from xodim where id =1; natijasi: so’rov mysql> select*from xodim where id=1 and fam="smith"; natijasi: so’rov mysql> select*from xodim where id=1 or fam="johnson"; natijasi: so’rov mysql> select*from xodim where not id=1 ; natijasi: 6.malumotlarni saralash so’rov mysql> select*from xodim order by ism; natijasi: 7.malumotlarni o’chirish so’rov mysql> delete from sotish where id=1; query ok, 1 row affected (0.02 sec) natijasi: 8.malumotlarni o’zgartirish so’rov mysql> update xodim set ish_haqi="supervisor" where id = 1; query ok, 1 row affected (0.00 sec) rows matched: 1 changed: 1 warnings: 0 natijasi: 9.jadvallarni o’chirish so’rov mysql> drop table sotish; query ok, 0 rows affected (0.02 sec) natijasi: 10.jadval ustunlarini o’zgartirish so’rov mysql> alter table xodim -> add column manzil varchar(50) after ish_haqi , -> drop column tajribasi; query ok, 2 rows affected (0.03 sec) records: 2 duplicates: 0 warnings: 0 natijasi:
4 / 12
avtosalon bazasi yaratilishi - Page 4
5 / 12
avtosalon bazasi yaratilishi - Page 5

Want to read more?

Download all 12 pages for free via Telegram.

Download full file

About "avtosalon bazasi yaratilishi"

1-topshiriq mohiyat aloqa diagrammasi mavzu : avtosalon 1.avtosalon bazani yaratib olamiz mysql> create database avtosalon; query ok, 1 row affected (0.01 sec) natijasi: 2.yaratgan bazani ko’rib va uni tanlab olamiz so’rov: show databases; so’rov: mysql> use avtosalon; database changed natijasi: 3.create table table name buyrugi ostida jadvallarimizni yaratib olamiz: so’rov: mysql> create table xodim( -> id int auto_increment primary key, -> ism char(50), -> fam char(50), -> ota_ismi char(50), -> tajribasi char(50), -> ish_haqi varchar(50)); query ok, 0 rows affected (0.02 sec) mysql> create table markasi( -> id int auto_increment primary key, -> tovar_nomi char(50), -> davlat char(50), -> zavod_ishlab_chiqaruvchi char(50), -> manzili varchar(50)); query ok, 0 rows affected (0.01 sec) mysq...

This file contains 12 pages in PDF format (928.3 KB). To download "avtosalon bazasi yaratilishi", click the Telegram button on the left.

Tags: avtosalon bazasi yaratilishi PDF 12 pages Free download Telegram