OCP-1Z0-051-Question Analysis-7th question

Source: Internet
Author: User

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;

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.