Select xodimlar ismi



Yüklə 13,78 Kb.
tarix23.03.2022
ölçüsü13,78 Kb.
#84660
11 labaratoriya
6-ellirs ta'rifi.Kanonik tenglamasi va hossalari,, 8-Ma'ruza, Gladiator Level 4

mysql> select xodimlar.ismi

-> from xodimlar;

+------------+

| ismi |


+------------+

| Dilshodbek |

| Alisher |

| Oybek |

| Botir |

| Shavkatjon |

+------------+

5 rows in set (0.00 sec)

mysql> select xodimlar.familiyasi

-> from xodimlar;

+--------------+

| familiyasi |

+--------------+

| Abdurazzaqov |

| Kadirov |

| Ergashev |

| Shuhratov |

| Tojiboyev |

+--------------+

5 rows in set (0.00 sec)

mysql> select distinct ismi from xodimlar;

+------------+

| ismi |

+------------+

| Dilshodbek |

| Alisher |

| Oybek |

| Botir |

| Shavkatjon |

+------------+

5 rows in set (0.00 sec)

mysql> select distinct familiyasi from xodimlar;

+--------------+

| familiyasi |

+--------------+

| Abdurazzaqov |

| Kadirov |

| Ergashev |

| Shuhratov |

| Tojiboyev |

+--------------+

5 rows in set (0.00 sec)

mysql> select *xodimlar,kutubxona;

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'xodimlar,kutubxona' at line 1

mysql> select *from xodimlar,kutubxona;

+------------+--------------+---------------+----------+---------+--------------+---------------------+-------------+------------+

| ismi | Familiyasi | Tugilgan_yili | Malumoti | Maoshi | Lavozimi | Nomi | Manzili | Tel_raqami |

+------------+--------------+---------------+----------+---------+--------------+---------------------+-------------+------------+

| Dilshodbek | Abdurazzaqov | 20.07.1980 | oliy | 2000000 | Sotuvchi | Alisher_Navoiy | Toshkent_sh | 901578585 |

| Dilshodbek | Abdurazzaqov | 20.07.1980 | oliy | 2000000 | Sotuvchi | Behbudiy | Andijon_sh | 917565656 |

| Dilshodbek | Abdurazzaqov | 20.07.1980 | oliy | 2000000 | Sotuvchi | Yoshlar_kutubxonasi | Qoqon_sh | 933554949 |

| Dilshodbek | Abdurazzaqov | 20.07.1980 | oliy | 2000000 | Sotuvchi | Elektron_k | Fargona_sh | 995842624 |

| Alisher | Kadirov | 09.12.1980 | oliy | 2100000 | Sotuvchi | Alisher_Navoiy | Toshkent_sh | 901578585 |

| Alisher | Kadirov | 09.12.1980 | oliy | 2100000 | Sotuvchi | Behbudiy | Andijon_sh | 917565656 |

| Alisher | Kadirov | 09.12.1980 | oliy | 2100000 | Sotuvchi | Yoshlar_kutubxonasi | Qoqon_sh | 933554949 |

| Alisher | Kadirov | 09.12.1980 | oliy | 2100000 | Sotuvchi | Elektron_k | Fargona_sh | 995842624 |

| Oybek | Ergashev | 15.02.1990 | orta | 1500000 | kuryer | Alisher_Navoiy | Toshkent_sh | 901578585 |

| Oybek | Ergashev | 15.02.1990 | orta | 1500000 | kuryer | Behbudiy | Andijon_sh | 917565656 |

| Oybek | Ergashev | 15.02.1990 | orta | 1500000 | kuryer | Yoshlar_kutubxonasi | Qoqon_sh | 933554949 |

| Oybek | Ergashev | 15.02.1990 | orta | 1500000 | kuryer | Elektron_k | Fargona_sh | 995842624 |

| Botir | Shuhratov | 12.07.1987 | orta | 1300000 | Kutubxonachi | Alisher_Navoiy | Toshkent_sh | 901578585 |

| Botir | Shuhratov | 12.07.1987 | orta | 1300000 | Kutubxonachi | Behbudiy | Andijon_sh | 917565656 |

| Botir | Shuhratov | 12.07.1987 | orta | 1300000 | Kutubxonachi | Yoshlar_kutubxonasi | Qoqon_sh | 933554949 |

| Botir | Shuhratov | 12.07.1987 | orta | 1300000 | Kutubxonachi | Elektron_k | Fargona_sh | 995842624 |

| Shavkatjon | Tojiboyev | 2.05.1992 | oliy | 2800000 | Menejer | Alisher_Navoiy | Toshkent_sh | 901578585 |

| Shavkatjon | Tojiboyev | 2.05.1992 | oliy | 2800000 | Menejer | Behbudiy | Andijon_sh | 917565656 |

| Shavkatjon | Tojiboyev | 2.05.1992 | oliy | 2800000 | Menejer | Yoshlar_kutubxonasi | Qoqon_sh | 933554949 |

| Shavkatjon | Tojiboyev | 2.05.1992 | oliy | 2800000 | Menejer | Elektron_k | Fargona_sh | 995842624 |

+------------+--------------+---------------+----------+---------+--------------+---------------------+-------------+------------+

20 rows in set (0.00 sec)

mysql> select ismi from xodimlar union select nomi from kutubxona;

+---------------------+

| ismi |

+---------------------+

| Dilshodbek |

| Alisher |

| Oybek |

| Botir |

| Shavkatjon |

| Alisher_Navoiy |

| Behbudiy |

| Yoshlar_kutubxonasi |

| Elektron_k |

+---------------------+

9 rows in set (0.00 sec)

mysql> select ismi from xodimlar union all select nomi from kutubxona;

+---------------------+

| ismi |


+---------------------+

| Dilshodbek |

| Alisher |

| Oybek |

| Botir |

| Shavkatjon |

| Alisher_Navoiy |

| Behbudiy |

| Yoshlar_kutubxonasi |

| Elektron_k |

+---------------------+

9 rows in set (0.00 sec)

mysql> select ismi from xodimlar where xodimlar.ismi in(select nomi from kutubxona);

Empty set (0.01 sec)

mysql> select ismi from xodimlar where xodimlar.ismi not in(select nomi from kutubxona);

+------------+

| ismi |

+------------+

| Dilshodbek |

| Alisher |

| Oybek |

| Botir |

| Shavkatjon |

+------------+



5 rows in set (0.00 sec)

mysql>
Yüklə 13,78 Kb.

Dostları ilə paylaş:




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©genderi.org 2022
rəhbərliyinə müraciət

    Ana səhifə