LEFT JOIN vs. LEFT OUTER JOIN in SQL Server


 

SELECT * FROM `tbl_product2` A LEFT JOIN `tbl_product` B ON A.id_product = B.id_product WHERE B.id_product IS NULL

 

SELECT * FROM `tbl_product2_lang` A LEFT JOIN `tbl_product_lang` B ON A.id_product = B.id_product WHERE B.id_product IS NULL

SELECT * FROM `tbl_product2_sale` A LEFT JOIN `tbl_product_sale` B ON A.id_product = B.id_product WHERE B.id_product IS NULL

SELECT * FROM `tbl_product2_shop` A LEFT JOIN `tbl_product_shop` B ON A.id_product = B.id_product WHERE B.id_product IS NULL

SELECT * FROM `tbl_product2_tag` A LEFT JOIN `tbl_product_tag` B ON A.id_product = B.id_product WHERE B.id_product IS NULL

SELECT * FROM `tbl_product2_comment` A LEFT JOIN `tbl_product_comment` B ON A.id_product_comment = B.id_product_comment WHERE B.id_product_comment IS NULL


SELECT * FROM `tbl_image2` A LEFT JOIN `tbl_image` B ON A.id_product = B.id_product WHERE B.id_product IS NULL

SELECT * FROM `tbl_image2_lang` A LEFT JOIN `tbl_image_lang` B ON A.id_image = B.id_image WHERE B.id_image IS NULL

SELECT * FROM `tbl_image2_shop` A LEFT JOIN `tbl_image_shop` B ON A.id_product = B.id_product WHERE B.id_product IS NULL


SELECT * FROM `tbl_tag2` A LEFT JOIN `tbl_tag` B ON A.id_tag = B.id_tag WHERE B.id_tag IS NULL

SELECT * FROM `tbl_tag2_count` A LEFT JOIN `tbl_tag_count` B ON A.id_tag = B.id_tag WHERE B.id_tag IS NULL


SELECT * FROM `tbl_category2_product` A LEFT JOIN `tbl_category_product` B ON A.id_product = B.id_product WHERE B.id_product IS NULL

SELECT * FROM `tbl_stock2_available` A LEFT JOIN `tbl_stock_available` B ON A.id_product = B.id_product WHERE B.id_product IS NULL

 

 MySQL

 

Source:

https://stackoverflow.com/questions/406294/left-join-vs-left-outer-join-in-sql-server



Article ID: 3
Created On: Wed, Sep 2, 2020 at 1:14 AM
Last Updated On: Mon, Dec 20, 2021 at 9:23 PM
Authored by: Saeed Nobakht [[email protected]]

Online URL: https://www.navel.ir/article/left-join-vs-left-outer-join-in-sql-server-3.html