JOIN
子句来查询两个表的数据。,,``sql,SELECT a.column1, b.column2,FROM table1 a,JOIN table2 b ON a.common_column = b.common_column;,
``,,这段 SQL 语句将返回两个表中匹配的记录。sql,SELECT a.column1, b.column2,FROM table1 a,JOIN table2 b ON a.id = b.id;,
``,,这段SQL代码会从table1和table2中查询数据,并将结果合并在一起。Powered By Z-BlogPHP 1.7.3
Copyright Your WebSite.Some Rights Reserved.