Get the App
SLTechnology News&Howtos  ›  Development  › 

How to realize full external join query by mysql union

Shulou Source: shulou.com Published: 2022-06-03 07:09:59 11月15日 Update

This article introduces how to achieve full external connection query in mysql union. The content is very detailed. Interested friends can use it for reference. I hope it will be helpful to you.

1. Union is not a way of multi-table join query, which combines the query results of multiple query sentences into one result and removes duplicate data.

2. The full outer join queries the data of the left and right tables, and then connects according to the connection conditions.

Example

# use the BSELECT * FROM t_category c LEFT OUTER JOIN t_product p ON c.cid = p.cnounionSELECT * FROM t_category c RIGHT OUTER JOIN t_product p ON c.cid = p.cno on the left outside A union to share here on how to implement the full external join query in mysql union. I hope the above content can be helpful to everyone and learn more knowledge. If you think the article is good, you can share it for more people to see.

Tags: Queries content data more results help good interest sentences multiple examples guys buddies articles methods conditions knowledge articles and references Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn Linux Docker Shulou Technology Redmi