Gurux talabasi Qambaraliyev Ahliddin 2-deadline


Download 73.76 Kb.
bet2/6
Sana02.06.2024
Hajmi73.76 Kb.
#1835492
1   2   3   4   5   6
Bog'liq
Ahliddin baza

Har bir talaba o’ziga berilgan predmet soha mavzusi bo’yicha WHERE, IN, BETWEEN, LIKE operatorlaridan foydalanib so’rovlar yaratishi va natijasi bilan ko’rsatib o’tishi kerak.

mysql> select* from kemalar where not( k_i_raqami='1' and joylashtirish='Kasbiy');


+------------+-----------+-----------+------------+-----------+--------+-----------------+----------------+---------------+
| k_i_raqami | kema_nomi | kema_turi | y_sanasi | ish_vaqti | o_soni | v_qurilmasi | haydovchi_turi | joylashtirish |
+------------+-----------+-----------+------------+-----------+--------+-----------------+----------------+---------------+
| 2 | Lochin | Kater | 2021-02-02 | 11:10:30 | 20 | Qutqaruv qayigi | Mutaxasis | Lablador |
| 3 | Bear | Kuryer | 2022-03-03 | 10:10:10 | 30 | Qayiqlar | Mutaxasis | Shimoliy |
+------------+-----------+-----------+------------+-----------+--------+-----------------+----------------+---------------+
2 rows in set (0.00 sec)

mysql> select* from kemalar where k_i_raqami in (1,2,3);


+------------+-----------+---------------+------------+-----------+--------+-----------------+----------------+---------------+
| k_i_raqami | kema_nomi | kema_turi | y_sanasi | ish_vaqti | o_soni | v_qurilmasi | haydovchi_turi | joylashtirish |
+------------+-----------+---------------+------------+-----------+--------+-----------------+----------------+---------------+
| 1 | Arslon | Yuk tashuvchi | 2020-12-12 | 12:12:20 | 25 | yelkan | Tajribali | Kasbiy |
| 2 | Lochin | Kater | 2021-02-02 | 11:10:30 | 20 | Qutqaruv qayigi | Mutaxasis | Lablador |
| 3 | Bear | Kuryer | 2022-03-03 | 10:10:10 | 30 | Qayiqlar | Mutaxasis | Shimoliy |
+------------+-----------+---------------+------------+-----------+--------+-----------------+----------------+---------------+
3 rows in set (0.00 sec)

mysql> select* from kemalar where k_i_raqami in (1,3);


+------------+-----------+---------------+------------+-----------+--------+-------------+----------------+---------------+
| k_i_raqami | kema_nomi | kema_turi | y_sanasi | ish_vaqti | o_soni | v_qurilmasi | haydovchi_turi | joylashtirish |
+------------+-----------+---------------+------------+-----------+--------+-------------+----------------+---------------+
| 1 | Arslon | Yuk tashuvchi | 2020-12-12 | 12:12:20 | 25 | yelkan | Tajribali | Kasbiy |
| 3 | Bear | Kuryer | 2022-03-03 | 10:10:10 | 30 | Qayiqlar | Mutaxasis | Shimoliy |
+------------+-----------+---------------+------------+-----------+--------+-------------+----------------+---------------+
2 rows in set (0.00 sec)

mysql> select kema_nomi,joylashtirish from kemalar where k_i_raqami between 1 and 3;


+-----------+---------------+
| kema_nomi | joylashtirish |
+-----------+---------------+
| Arslon | Kasbiy |
| Lochin | Lablador |
| Bear | Shimoliy |
+-----------+---------------+
3 rows in set (0.00 sec)

mysql> select* from kemalar where joylashtirish like 'K%';


+------------+-----------+---------------+------------+-----------+--------+-------------+----------------+---------------+
| k_i_raqami | kema_nomi | kema_turi | y_sanasi | ish_vaqti | o_soni | v_qurilmasi | haydovchi_turi | joylashtirish |
+------------+-----------+---------------+------------+-----------+--------+-------------+----------------+---------------+
| 1 | Arslon | Yuk tashuvchi | 2020-12-12 | 12:12:20 | 25 | yelkan | Tajribali | Kasbiy |
+------------+-----------+---------------+------------+-----------+--------+-------------+----------------+---------------+
1 row in set (0.00 sec)

mysql>



  1. Download 73.76 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