Guruh Talaba Qabul qildi 652-21 Shokarimov Murodjon A. Dilshodov


Download 421.8 Kb.
Pdf ko'rish
bet1/3
Sana03.02.2023
Hajmi421.8 Kb.
#1150299
  1   2   3
Bog'liq
Murodjon MB 3-dedline



Guruh 
Talaba 
Qabul qildi 
652-21 
Shokarimov Murodjon 
A.Dilshodov 
 
 
SQL tilida INDEX yaratish. Tasavvur, VIEW yaratish va undan 
foydalanish. 
 
mysql> show indexes from abonentlar
+------------+------------+----------+--------------+-------------+-----------+--------
-----+----------+--------+------+------------+---------+ 
| Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation 
| Cardinality | Sub_part | Packed | Null | Index_type | Comment | 
+------------+------------+----------+--------------+-------------+-----------+--------
-----+----------+--------+------+------------+---------+ 
| abonentlar | 0 | PRIMARY | 1 | id_a | A | 1 |
NULL | NULL | | BTREE | | 
| abonentlar | 1 | ismlar | 1 | ismi | A | 1 | NULL 
| NULL | | BTREE | | 
+------------+------------+----------+--------------+-------------+-----------+--------
-----+----------+--------+------+------------+---------+ 
2 rows in set (0.04 sec) 
mysql> create view Murodjon 
-> as select ismi,familyasi from abonentlar; 
Query OK, 0 rows affected (0.08 sec) 
mysql> show full tables
+---------------------------+------------+ 
| Tables_in_telefon_tarmogi | Table_type | 
+---------------------------+------------+ 
| abonent_tolov_royxati | BASE TABLE | 
| abonentlar | BASE TABLE | 
| murodjon | VIEW | 
| pbx | BASE TABLE | 
| pbx_narxlari | BASE TABLE | 
| qongiroqlar_royxati | BASE TABLE | 


+---------------------------+------------+ 
6 rows in set (0.00 sec) 
 
 
 
Xulosa 
Index yaratish nimaga kerak ma’lumotlarni izlashda indexdan foydalanish 
eng vaqtni tejash uchun yaxshi variant ekan. Bazamizdagi index kitoblarni 
orqasidagi mundarijaga o’xshaydi, va ma’lumotni topishni tezlashtiradi. 


Localhost 
mysql> use 
texnika_savdo_dokoni; 
Database changed mysql> 
select user from mysql.user;
+------+
| user |
+------+
| Nuriddin |
| |
| root |
+------+
3 rows in set (0.02 sec) mysql> 
create user 'Texnik'@'localhost'
-> identified by 'password' ;
Query OK, 0 rows affected (0.14 sec)
mysql> select user from mysql.user;
+----------+
| user |
+----------+
| root |
| |
| Texnik |
| nuriddin |
| root |
+----------+
5 rows in set (0.00 sec)



Download 421.8 Kb.

Do'stlaringiz bilan baham:
  1   2   3




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling