In addition to Weibo, there is also WeChat
Please pay attention

WeChat public account
Shulou
2025-11-08 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "what types of mysql external connections are". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let Xiaobian take you to learn "what type of mysql external connection"!
1. The left outer join keeps the records to be discarded in the left table in the result set, and the corresponding part in the right table is filled with null.
mysql> select a.*, b.* from course as a left join rollcall as b on a.course_id=b.course_id;+-----------+-------------+------+---------+-----------+-----------+------+-----------+------------+--------------+--------------+---------+| course_id | course_name | time | teacher | classroom | t_command | db | course_id | student_id | student_name | teacher_name | command |+-----------+-------------+------+---------+-----------+-----------+------+-----------+------------+--------------+--------------+---------+| 1 | 1234 | 123 | 123 | 123 | 123 | 2 | 1 | 1501010096 |Yu Zongyun | 123 | 123 || 2 | 123 | 123 | 123 | 123 | 123 | NULL | NULL | NULL | NULL | NULL | NULL |+-----------+-------------+------+---------+-----------+-----------+------+-----------+------------+--------------+--------------+---------+
2. Right outer connection, keep the records to be discarded in the right table in the result set, and fill the corresponding part in the left table with null.
mysql> select a.*, b.* from course as a right join rollcall as b on a.course_id=b.course_id;+-----------+-------------+------+---------+-----------+-----------+----+-----------+------------+--------------+--------------+---------+| course_id | course_name | time | teacher | classroom | t_command | db | course_id | student_id | student_name | teacher_name | command |+-----------+-------------+------+---------+-----------+-----------+----+-----------+------------+--------------+--------------+---------+| 1 | 1234 | 123 | 123 | 123 | 123 | 2 | 1 | 1501010096 |Yu Zongyun | 123 | 123 |+-----------+-------------+------+---------+-----------+-----------+----+-----------+------------+--------------+--------------+---------+1 row in set (0.00 sec)
Total outer join: Keep the records to be discarded in the left and right tables in the result set.
The corresponding parts of the right and left tables are filled with nulls.
#Since oracle is not installed on this machine, the correctness of the first sentence of sql is not verified. Select * from table1 full join table2 on table1.C=table2.C At this point, I believe that everyone has a deeper understanding of "what type of mysql external connection". Let's actually operate it! Here is the website, more related content can enter the relevant channels for inquiry, pay attention to us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope





About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.