問題文
Two tables share the column names department_id and manager_id. A developer joins them with the NATURAL JOIN keywords and expects the join to use department_id alone. Which columns does the join actually compare?
選択肢
- The first shared column, because a natural join is based on the column that appears earliest in the definition of the first table.
- Both shared columns, because a natural join is based on every column that carries the same name in the two tables that are being joined.
- The primary key columns, because a natural join is based on the key that the two tables declare rather than on the column names.
- The columns named in the ON clause, because a natural join is based on the condition that the writer adds to the keywords.