Muhammad al-xorazmiy nomidagi toshkent axborat texnologiyalari univesiteti


SELECT column_names [,... n] FROM Table_1 RIGHT JOIN Table_2 ON condition


Download 0.56 Mb.
bet3/8
Sana28.12.2022
Hajmi0.56 Mb.
#1015593
1   2   3   4   5   6   7   8
SELECT column_names [,... n] FROM Table_1 RIGHT JOIN Table_2 ON condition

Right outer join operatorining Venn diagraamsi orqali ko‘rinishi.

  1. CROSS JOIN operatori 1 jadvaldagi xar bir element uchun 2 jadvaldagi elementlarni bog`lab chiqadi. SQL CROSS JOIN operatorining sintaksisi quyidagi ko`rinishda bo`ladi:

SELECT column_names [,... n] FROM Table_1 CROSS JOIN Table_2

5. SQL FULL OUTER JOIN operatori 1 jadvaldagi xar bir element uchun 2 jadvaldagi elementlarni bog`lab chiqadi. SQL FULL OUTER JOIN operatorining sintaksisi quyidagi ko`rinishda bo`ladi:


SELECT column_names [,... n] FROM Table_1 FULL JOIN Table_2 ON condition

Full outer join operatorining Venn diagrammasi orqali ko‘rinishi
Ishning bajarilish tartibi.
1.Join qilmoqchi bo’gan jadvallarni chiqaramiz.
Sorov: select * from magazin_ishchilari;


8.1-rasm.Magazin_ishchialri jadvali.
Sorov: select * from firma_ishchilari;


8.2-rasm.Firma_ishchialri jadvali.
2.Bu ikki jadvalni inner join orqali biralshtiramiz va natijani chaiqaramiz.
So’rov: select * from firma_ishchilari inner join magazin_ishchilari on firma_ishchilari.id=magazin_ishchilari.id;


8.3-rasm. Inner join va on kalit so’zining ishlatilish.
3.Bu ikki jadval uchun lef join orqali birlashtiramiz.
So’rov: select * from firma_ishchilari left join magazin_ishchilari on firma_ishchilari.name=magazin_ishchilari.name;

8.4-rasm.Left join va on kalit so’zining ishlatilishi.
So’rov: select * from magazin_ishchilari left join firma_ishchilari on firma_ishchilari.name=magazin_ishchilari.name;


8.5-rasm. Left join va on kalit so’zining ishlatilishi.
4.Bu ikki jadvalni right join bln birlashtiramiz
So’rov: select * from magazin_ishchilari right join firma_ishchilari on firma_ishchilari.maoshi_$da=magazin_ishchilari.maoshi_$da;


8.6-rasm.Right join va on kalit so’zining ishlatilishi.
5. Bu ikki jadvalni Croos join orqali birlashtiramiz

Download 0.56 Mb.

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




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