inner join on
时间: 2023-10-22 16:04:05 浏览: 96
Mysql inner join on的用法实例(必看)
Inner join is a type of join operation in relational databases that returns only the rows where there is a match in both tables being joined. It combines the rows from two tables based on a common column between them. The resulting output will contain only the rows where the matching condition is true in both tables. The syntax for inner join is as follows:
SELECT column_name(s)
FROM table1
INNER JOIN table2
ON table1.column_name = table2.column_name;
In this example, table1 and table2 are the names of the tables being joined, and column_name is the name of the common column in both tables. The ON keyword specifies the condition that must be met for a row to be included in the output. Only the columns specified in the SELECT statement will be returned in the output.
阅读全文