Joining Multiple Tables Flashcards
6 cards from real 1Z0-071 practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 6 Joining Multiple Tables flashcards as text
What is a self-join used for?
Answer: Joining a table to itself to compare rows within the same table
A self-join joins a table to itself using aliases, typically to compare rows such as employee-manager relationships.
In a three-table join, how many join conditions are typically required?
Answer: 2
For N tables you need at minimum N-1 join conditions, so 3 tables require at least 2 join conditions.
Which Oracle-proprietary outer join syntax uses the (+) operator?
Answer: SELECT * FROM a, b WHERE a.id = b.id(+)
Oracle's proprietary outer join syntax places (+) on the side of the table that may have missing rows (the optional side).
Which type of join condition compares columns using an operator other than equals (=)?
Answer: Non-equijoin
A non-equijoin uses comparison operators like BETWEEN, instead of = to match rows.
When using a USING clause in a JOIN, what happens if you try to prefix the USING column with a table alias?
Answer: Oracle raises an ORA-25154 error
Oracle raises ORA-25154 if you prefix the USING clause column with a table alias because it is common to both tables.
Which statement about NATURAL JOIN is TRUE?
Answer: It automatically joins on all columns with the same name
NATURAL JOIN implicitly equi-joins all columns that share the same name between the two tables.