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
12.4 – rasm. Full outer join operatorining Venn
diagrammasi orqali ko‘rinishi.
Ishni bajarish tartibi
1.
SQL INNER JOIN operatori
So`rov: select *from xodimlar inner join
ishchilar on xodimlar.FIO =
ishchilar.FIO;
Natija:
12.5 - rasm. Inner join qo‘llanishi natijasi.
2.LEFT JOIN operatori
So`rov: select *from xodimlar left join ishchilar on xodimlar.FIO =
ishchilar.FIO;Natija:
12.5 - rasm. Left join qo‘llanishi natijasi.
2.
RIGHT JOIN operatori
So`rov: select *from xodimlar right join ishchilar on xodimlar.FIO
= ishchilar.FIO;
Natija:
12.6 – rasm. Right join qo‘llanishi natijasi.
3.
CROSS JOIN operatori
So`rov: select *from xodimlar cross join ishchilar on
xodimlar.FIO = ishchilar.FIO;
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:
Do'stlaringiz bilan baham: |