In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
How to understand the query idea of MySQL data linked list? in view of this problem, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible method.
In website development, when it comes to MySQL database query, we often need to combine two or more tables to query data, which uses the JOIN function in MySQL.
There are three JOIN functions, which are:
LEFTJOIN left join query: query the common data in the two tables, display all the data in the left table based on the left table, display the qualified data in the right table, and show NULL in the deficiency.
RIGHTJOIN right join query: query the data shared by the two tables, and display all the data in the right table based on the right table, and show NULL in the insufficient data in the left table
Join query within INNERJOIN: displays data shared by two tables
Mysql connected table query
1. Inner join (a typical join operation that uses comparison operators such as = or). It includes equal connection and natural connection.
The inner join uses the comparison operator to match rows in two tables based on the values of the columns common to each table. For example, retrieve all rows with the same student identification number in the students and courses tables.
2. Outer connection. The outer join can be a left outer join, a right outer join, or a full outer join.
When an outer join is specified in the FROM clause, it can be specified by one of the following sets of keywords:
1) LEFTJOIN or LEFTOUTERJOIN
The result set of the left outer join includes all rows of the left table specified in the LEFTOUTER clause, not just the rows matched by the join column. If a row of the left table does not match in the right table, all select list columns of the right table in the associated result set rows are null.
2) RIGHTJOIN or RIGHTOUTERJOIN
The right outer join is the reverse join of the left outer join. All rows of the right table are returned. If a row of the right table does not match in the left table, a null value is returned for the left table.
3) FULLJOIN or FULLOUTERJOIN
The full outer join returns all rows in the left and right tables. When a row does not match a row in another table, the select list column of the other table contains null values. If there are matching rows between tables, the entire result set row contains the data values of the base table.
3. Cross connection
The cross join returns all rows in the left table, and each row in the left table is combined with all rows in the right table. Cross joins are also called Cartesian products.
Tables or views in the FROM clause can be specified in any order through an inner join or a full outer join; however, when you specify a table or view with a left or right outer join, the order of the table or view is important. For more information about using left or right outward join to arrange lists, see using outer joins.
This is the answer to the question about how to understand the query ideas of MySQL data linked list. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel to learn more about it.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.