7. Which two statements are true regarding the USING and ON clses in table joins? (Choose two .)
A. Both USING and ON clses 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.
Answer: CD
Question Analysis:
A: both Using and On clauses can be used for equality and inequality connections (incorrect, Using can only be used for Equality connections)
B: Use the On clause between two tables to connect up to two fields (incorrect, multiple fields can be connected, for example, on e. empno = d. empno and e. deptno = d. deptno)
C: The On clause can be used to connect fields with different names in two tables, but the data type must be compatible (correct, The On clause can be used to connect different field names, and Using can only be used for the same field name)
D: In the Select statement that contains the On and Using clauses, you can use the Where statement as an additional condition (correct, for example:
SELECT e.department_id, d.department_idFROM employees e JOIN departments d ON (e.department_id = d.department_id) Where e.department_id>20;