Join, union a


Download 1.2 Mb.
bet4/5
Sana18.06.2023
Hajmi1.2 Mb.
#1571375
1   2   3   4   5
Bog'liq
jadvallarni qo\'shishda so\'rovlar

12.4 – rasm. Full outer join operatorining Venn diagrammasi orqali ko‘rinishi


Ishni bajarish tartibi

  1. SQL INNER JOIN operatori

So‘rov: SELECT *FROM zavod_xodimlari
INNER JOIN kon_xodimlari
ON zavod_xodimlari.FISH=kon_xodimlari.FISH;
Natija:

12.5 - rasm. Inner join qo‘llanishi natijasi
2. LEFT JOIN operatori
So‘rov: SELECT * FROM zavod_xodimlari
LEFT JOIN kon_xodimlari
ON zavod_xodimlari.manzili = kon_xodimlari.manzili;
Natija:

12.5 - rasm. Left join qo‘llanishi natijasi



  1. RIGHT JOIN operatori

So‘rov: SELECT *FROM zavod_xodimlari
RIGHT JOIN kon_xodimlari
ON zavod_xodimlari.oyligi = kon_xodimlari.oyligi;
Natija:

12.6 – rasm. Right join qo‘llanishi natijasi
3. CROSS JOIN operatori
So‘rov: SELECT *FROM zavod_xodimlari
CROSS JOIN kon_xodimlari
ON zavod_xodimlari.ish_staji = kon_xodimlari.ish_staji;
Natija:

12.7– rasm. Cross join qo‘llanishi natijasi
4. FULL OUTER JOIN operatori:
So‘rov: SELECT *FROM zavod_xodimlari
FULL OUTER JOIN kon_xodimlari
ON zavod_xodimlari.FISH=kon_xodimlari.FISH;
Natija:
12.1– jadval. Full outer join qo‘llanishi natijasi

Xodim_id

FISH

Manzili

lavozimi

Ish_staji

oyligi

1


Download 1.2 Mb.

Do'stlaringiz bilan baham:
1   2   3   4   5




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