对表名使用别名是最短的.
SELECT a.*, b.*
FROM table1 as 'a'
INNER JOIN table2 as 'b'
ON a.col1 = b.col1
Run Code Online (Sandbox Code Playgroud)
您还可以指定完整的表名称.
SELECT table1.*, table2.*
FROM table1
INNER JOIN table2
ON table1.col1 = table2.col1
Run Code Online (Sandbox Code Playgroud)
你问的是NATURAL JOIN关系术语.某些数据库服务器支持此子句.我宁愿手动指定连接表达式,即使提供程序支持如下子句:
SELECT .... FROM Table1 JOIN Table2 ON Table1.JoinCol = Table2.JoinCol ...
Run Code Online (Sandbox Code Playgroud)