Guruh talabasi Maxsudov Azamxon Yunusxo’ja o’g’li 15-16. Laboratoriya ishi Mavzu


Download 24.63 Kb.
bet1/4
Sana07.04.2022
Hajmi24.63 Kb.
#628015
  1   2   3   4
Bog'liq
15-16-17-18-19-20 LAB ISHLAR
00186705-89cc39db, Фарду, AUTODESK INVENTOR, Abduvali, Abduvali, Мир исскуства, 1-ma'ruza, lab1, Mamayusupova mustaqil ish, Biz baxorga oshiq boldik, Kurs ishi mavzulari, 2-hafta topshirig'i essey, ON, 1-amaliy mashgulot mavzusi, 8-amaliy

642-20 guruh talabasi Maxsudov Azamxon Yunusxo’ja o’g’li
15-16.Laboratoriya ishi
Mavzu: Bir necha jadvallarni birlashtirish, ‘join’ lar bilan ishlash.
Ishdan maqsad: Bir necha jadvallarni birlashtirish, ‘join’ lar bilan ishlash bo`yicha
ko`nikmaga ega bo`lish
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.1.51-community MySQL Community Server (GPL)

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.


This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;
+------------------------------------------+
| Database |
+------------------------------------------+
| information_schema |
| ayraport |
| mysql |
| test |
| universitet_talabalarini_ozlashtirishi10 |
+------------------------------------------+
5 rows in set (0.12 sec)

mysql> use universitet_talabalarini_ozlashtirishi10;


Database changed
mysql> show tables;
+----------------------------------------------------+
| Tables_in_universitet_talabalarini_ozlashtirishi10 |
+----------------------------------------------------+
| konfedralar |
| oquv_guruhlari |
| ozlashtirish_vedimosti |
| talabalar1 |
+----------------------------------------------------+
4 rows in set (0.09 sec)

mysql> select*from konfedralar;


+-----------------------+---------------------+---------------------+-----------
--------+-------------+-------------+------------------+
| Fakultet_nomi | Konfedra_nomi | Mudir_FIO | Oqituvchil
ar_soni | Bino_raqami | Xona_raqami | Telefon_raqamlar |
+-----------------------+---------------------+---------------------+-----------
--------+-------------+-------------+------------------+
| Kompyuter injineringi | Axborot xavfsizligi | Tojimatov Dostonbek |
5 | 1 | 202 | 732031111 |
+-----------------------+---------------------+---------------------+-----------
--------+-------------+-------------+------------------+
1 row in set (0.08 sec)

mysql> select*from oquv_guruhlari;


+---------------------+------------+----------------+------------+
| Guruh_nomi | Oquv_kursi | Talabalar_soni | Qabul_yili |
+---------------------+------------+----------------+------------+
| Axborot xavfsizligi | 2 | 19 | 2020 |
+---------------------+------------+----------------+------------+
1 row in set (0.04 sec)

mysql> select*from ozlashtirish_vedimosti;


+-----------+-------------------+---------------------+----------------+
| Talaba_id | Fanlar | Guruh_nomi | Baholar_ballar |
+-----------+-------------------+---------------------+----------------+
| 39220015 | Malumotlar bazasi | Axborot xavfsizligi | 100 |
+-----------+-------------------+---------------------+----------------+
1 row in set (0.05 sec)

mysql> select*from talabalar1;


+-----------+----------+---------+----------------+-------------+--------------+
----------------+--------------+-----------------------------+--------+
| Talaba_id | Fam | Ism | O_ismi | Yonalish_id | Guruh_raqami |
Talaba_manzili | Talaba_jinsi | Talaba_tugilgan_yili_sanasi | talaba |
+-----------+----------+---------+----------------+-------------+--------------+
----------------+--------------+-----------------------------+--------+
| 39220015 | Maxsudov | Azamxon | Yunusxoja ogli | 5330300 | 642 |
And vil | Erkak | 1999-01-27 | 19 |
+-----------+----------+---------+----------------+-------------+--------------+
----------------+--------------+-----------------------------+--------+
1 row in set (0.00 sec)

mysql> select fanlar,guruh_nomi from ozlashtirish_vedimosti INNER JOIN talabalar


1 ON
-> ozlashtirish_vedimosti.talaba_id=talabalar1.talaba_id;
+-------------------+---------------------+
| fanlar | guruh_nomi |
+-------------------+---------------------+
| Malumotlar bazasi | Axborot xavfsizligi |
+-------------------+---------------------+
1 row in set (0.06 sec)

mysql> select fanlar,guruh_nomi from ozlashtirish_vedimosti LEFT JOIN talabalar1


ON
-> ozlashtirish_vedimosti.talaba_id=talabalar1.talaba_id;
+-------------------+---------------------+
| fanlar | guruh_nomi |
+-------------------+---------------------+
| Malumotlar bazasi | Axborot xavfsizligi |
+-------------------+---------------------+
1 row in set (0.00 sec)

mysql> select fanlar,guruh_nomi from ozlashtirish_vedimosti RIGHT JOIN talabalar


1 ON
-> ozlashtirish_vedimosti.talaba_id=talabalar1.talaba_id;
+-------------------+---------------------+
| fanlar | guruh_nomi |
+-------------------+---------------------+
| Malumotlar bazasi | Axborot xavfsizligi |
+-------------------+---------------------+
1 row in set (0.00 sec)

mysql> select fanlar,guruh_nomi from ozlashtirish_vedimosti LEFT JOIN talabalar1


ON
-> ozlashtirish_vedimosti.talaba_id=talabalar1.talaba_id
-> UNION
-> select fanlar,guruh_nomi from ozlashtirish_vedimosti RIGHT JOIN talabalar
1 ON
-> ozlashtirish_vedimosti.talaba_id=talabalar1.talaba_id;
+-------------------+---------------------+
| fanlar | guruh_nomi |
+-------------------+---------------------+
| Malumotlar bazasi | Axborot xavfsizligi |
+-------------------+---------------------+
1 row in set (0.06 sec)

mysql> select fanlar,guruh_nomi from ozlashtirish_vedimosti CROSS JOIN talabalar


1;
+-------------------+---------------------+
| fanlar | guruh_nomi |
+-------------------+---------------------+
| Malumotlar bazasi | Axborot xavfsizligi |
+-------------------+---------------------+
1 row in set (0.00 sec)


Download 24.63 Kb.

Do'stlaringiz bilan baham:
  1   2   3   4




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