1. Har bir talaba o’ziga berilgan predmet soha mavzusi bo’yicha and, or


Download 432.03 Kb.
Pdf ko'rish
bet1/6
Sana18.12.2022
Hajmi432.03 Kb.
#1027742
  1   2   3   4   5   6
Bog'liq
2 - dedline



650-21 guruh talabasi Raimjonov 
Muhammadali 
2-dedline topshiriqlari 
1. Har bir talaba o’ziga berilgan predmet soha mavzusi bo’yicha AND, OR, 
NOT operatorlaridan foydalanib so’rovlar yaratishi va natijasi bilan 
ko’rsatib o’tishi kerak.
 
mysql> SELECT * FROM oqituvchilar WHERE `ishga_kirgan_yil`=2018 AND `maosh`=3000000; 
+----------+-----------+--------------+------------------+---------+---------+------------------+ 
| xodim_id | ism | familiya | ishga_kirgan_yil | maosh | lavozim | ish vaqti (soat) | 
+----------+-----------+--------------+------------------+---------+---------+------------------+ 
| 6 | Shoxruh | Jabborov | 2018 | 3000000 | zamdirektor | 8 | 
| 7 | Asror | Mahamadjonov | 2018 | 3000000 | o’qituvchi | 8 | 
+----------+-----------+--------------+------------------+---------+---------+------------------+ 
2 rows in set (0.00 sec) 
mysql> SELECT * FROM oqituvchilar WHERE `ishga_kirgan_yil`=2018 OR `maosh`=3000000; 
+----------+-------------+--------------+------------------+---------+--------------------+------------------+ 
| xodim_id | ism | familiya | ishga_kirgan_yil | maosh | lavozim | ish vaqti (soat) | 
+----------+-------------+--------------+------------------+---------+--------------------+------------------+ 
| 1 | Muhammadali | Raimjonov | 2018 | 5000000 | direktor | 8 | 
| 2 | Otabek | Xaydarov | 2018 | 2500000 | sifat nazoratchisi | 8 | 
| 3 | Xatamjon | Nosiraliyev | 2018 | 2500000 | sifat nazoratchisi | 8 | 
| 4 | Behruz | Boriyev | 2018 | 2200000 | ishchi xodim | 8 | 
| 5 | Dilshod | Komilov | 2018 | 2200000 | ishchi xodim | 8 | 
| 6 | Shoxrux | Jabborov | 2018 | 3000000 | mexanik | 8 | 
| 7 | Asror | Mahamadjonov | 2018 | 3000000 | mexanik | 8 | 


+----------+-------------+--------------+------------------+---------+--------------------+------------------+ 
8 rows in set (0.00 sec) 
mysql> SELECT * FROM oqituvchilar WHERE NOT `maosh`=2000000; 
+----------+-------------+-------------+------------------+---------+--------------------+------------------+ 
| xodim_id | ism | familiya | ishga_kirgan_yil | maosh | lavozim | ish vaqti (soat) | 
+----------+-------------+-------------+------------------+---------+--------------------+------------------+ 
| 1 | MUhammadali | Raimjonov | 2018 | 5000000 | direktor | 8 | 
| 2 | Otabek | Xaydarov | 2018 | 2500000 | sifat nazoratchisi | 8 | 
| 3 | Xatamjon | Nosiraliyev | 2018 | 2500000 | sifat nazoratchisi | 8 | 
| 4 | Behruz | Boriyev | 2018 | 2200000 | ishchi xodim | 8 | 
| 5 | Dilshod | Komilov | 2018 | 2200000 | ishchi xodim | 8 | 
+----------+-------------+-------------+------------------+---------+--------------------+------------------+ 
6 rows in set (0.00 sec) 

Download 432.03 Kb.

Do'stlaringiz bilan baham:
  1   2   3   4   5   6




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