Home » Categories » MySQL

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 Rating (No Votes)
Rate this article
  • Icon PDFExport to PDF
  • Icon MS-WordExport to MS Word
 
Attachments (1) Attachments
Comments Comments
There are no comments for this article. Be the first to post a comment.
Related Articles RSS Feed
UTF8 DB Text Fix
Viewed 2810 times since Sat, Sep 5, 2020
Host ’xxx.xx.xxx.xxx’ is not allowed to connect to this MySQL server
Viewed 511 times since Thu, Feb 4, 2021
Server error: Connection reset by peer | End of script output before headers
Viewed 2274 times since Mon, Feb 28, 2022
"End of script output before headers" in Apache + PHP
Viewed 596 times since Sun, Feb 27, 2022
Optimizing query for large number of rows in mysql
Viewed 477 times since Wed, Sep 9, 2020
Incorrect string value: ’\xF0\x9F\x8E\xB6\xF0\x9F...’ MySQL
Viewed 465 times since Thu, Feb 3, 2022
How to export a mysql database using Command Prompt?
Viewed 550 times since Wed, Sep 2, 2020
How to change the MySQL root account password on CentOS7?
Viewed 440 times since Thu, Feb 4, 2021
Export and Import all MySQL databases at one time
Viewed 452 times since Fri, Mar 18, 2022
How do I import an SQL file using the command line in MySQL?
Viewed 572 times since Wed, Sep 2, 2020