Oracle SQL Joins and Subqueries Flashcards
6 cards from real Oracle SQL practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 6 Oracle SQL Joins and Subqueries flashcards as text
Which type of JOIN returns only rows where there is a match in BOTH tables?
Answer: INNER JOIN
An INNER JOIN returns only those rows where the join condition is satisfied in both tables, excluding unmatched rows.
What does a LEFT OUTER JOIN return in Oracle SQL?
Answer: All rows from the left table and matching rows from the right
A LEFT OUTER JOIN returns all rows from the left table and NULL for unmatched columns from the right table.
In Oracle SQL, what is the legacy syntax equivalent of a LEFT OUTER JOIN?
Answer: table1, table2 WHERE table1.id = table2.id(+)
Oracle's proprietary (+) operator placed on the right side of the condition creates a LEFT OUTER JOIN.
What does a CROSS JOIN produce in Oracle SQL?
Answer: A Cartesian product of all rows from both tables
A CROSS JOIN produces a Cartesian product, pairing every row from the first table with every row from the second table.
Which Oracle SQL subquery type returns a single value used in a WHERE clause comparison?
Answer: Scalar subquery
A scalar subquery returns exactly one row and one column, making it suitable for use with single-value comparison operators like =, >, <.
What is a self-join in Oracle SQL?
Answer: Joining a table to itself using aliases
A self-join joins a table to itself using different aliases, commonly used for hierarchical data like employee-manager relationships.