【OCP】Oracle 11g OCP 1Z0-051 007

海星星hktk發表於2016-04-27
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.正確。
在包含onusing子句的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部落格 ” ,連結:http://blog.itpub.net/29475508/viewspace-2089373/,如需轉載,請註明出處,否則將追究法律責任。

相關文章