看起来似乎没有区别:
SELECT a.col1, b.col2
FROM table a JOIN table2 b
USING (col3)
Run Code Online (Sandbox Code Playgroud)
和
SELECT a.col1, b.col2
FROM table a JOIN table2 b
ON (a.col3 = b.col3)
Run Code Online (Sandbox Code Playgroud)
还是有吗?(当然除了ON我可以使用不同的列名)
不多.当然,ON允许这个,USING没有:
SELECT a.col1, b.col2
FROM table a JOIN table2 b
ON (a.col3 = b.col4)
^
Run Code Online (Sandbox Code Playgroud)
这是ANSI连接语法,它不是Oracle独有的.