7. Which two statements are true regarding the USING and ON clauses in table joins? (Choose two.)
A. Both USING and ON clauses can be used for equijoins and nonequijoins.
B. A maximum of one pair of columns can be joined between two tables using the ON clause.
C. The ON clause can be used to join tables on columns that have different names but compatible data types.
D. The WHERE clause can be used to apply additional conditions in SELECT statements containing the ON or the USING clause.
关于表连接中using 和 on子句的用法 正确的是
答案:CD
A.错. using 子句用于等值连接,且两个表中连接列名称要相同
B.错.on子句可以连接多个列
C.正确。on子句用于连接表的列可以是不同的名字,但是数据类型要兼容。
D.正确。 在包含on或using子句的select语句中,可以使用where限定附加的条件。
SCOTT@PROD>select e.empno,e.deptno,d.deptno,d.dname
2 from emp e join dept d
3 on e.deptno=d.deptno
4 where e.deptno<>20;

SCOTT@PROD>select e.empno,deptno,d.dname
2 from emp e join dept d
3 using (deptno)
4 where deptno<>20;

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/29475508/viewspace-2089373/
,如需转载,请注明出处,否则将追究法律责任。