JOIN
子句来关联两个表并查询数据。,,``sql,SELECT a.column1, b.column2,FROM table1 a,JOIN table2 b ON a.common_column = b.common_column;,
`,,这个查询将返回
table1 和
table2 中通过
common_column` 关联的数据。JOIN
子句来关联两个表并查询数据。,,``sql,SELECT a.column1, b.column2,FROM table1 a,JOIN table2 b ON a.common_column = b.common_column;,
`,,这个查询将返回
table1 和
table2 中通过
common_column` 关联的数据。NOT IN
或 EXCEPT
(MySQL 8.0 以上)来实现。Powered By Z-BlogPHP 1.7.3
Copyright Your WebSite.Some Rights Reserved.