Which two statements are true regarding the USING and ON clauses in table joins?

Which two statements are true regarding the USING and ON clauses in table joins? (Choose two.)

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.



Leave a Reply 8

Your email address will not be published. Required fields are marked *


Sue

Sue

i don’t think “D” is right. Any comment?

Justyna

Justyna

From the SQL Fundamentals I

Applaying Additional Conditions to a Join.
” To add additional conditions to the ON clause, you can add AND clauses. Alternatively, you can use a WHERE clause to applay additional conditions.”

Nikita Gupta

Nikita Gupta

Hello Justyna can u plz reply to my queries my exam is on 16 aug 2013

Artemisa

Artemisa

Can someone explain me why Answer A it’s incorrect? Thnaks!

mikeblas

mikeblas

“A” is incorrect because USING only performs equijoins.

SELECT foo
FROM MyTable
JOIN YourTable USING (foo_id);

The syntax offers no opportunity to specify an operator; the operator is always equality.

Soni

Soni

Why Answer ‘A’ is incorrect?

Muhammad Owais Siddiqui ORACLE DBA/DEVELOPER

Muhammad Owais Siddiqui ORACLE DBA/DEVELOPER

SQL> SELECT ENAME,DNAME FROM EMP E JOIN DEPT D
2 ON E.DEPTNO=D.DEPTNO;

ENAME DNAME
———- ————–
CLARK ACCOUNTING
KING ACCOUNTING
MILLER ACCOUNTING
JONES RESEARCH
FORD RESEARCH
ADAMS RESEARCH
SMITH RESEARCH
SCOTT RESEARCH
WARD SALES
TURNER SALES
ALLEN SALES

ENAME DNAME
———- ————–
JAMES SALES
BLAKE SALES
MARTIN SALES

14 rows selected.

SQL> SELECT ENAME,DNAME FROM EMP E JOIN DEPT D
2 ON E.DEPTNO=D.DEPTNO
3 WHERE ENAME=’CLARK’;

ENAME DNAME
———- ————–
CLARK ACCOUNTING