In PostgreSQL 18, table na has columns (a_id, label) and 3 rows, table nb has columns (b_id, note) and 2 rows, and the two tables share no column name. How many rows does SELECT * FROM na NATURAL JOIN nb; return?
Explanation
NATURAL builds a USING list from the column names present in both tables; when that list is empty there is no join condition left and the statement degenerates into a Cartesian product of 3 x 2 rows. Expecting an error or zero rows assumes PostgreSQL treats a missing common column as a failure, which is exactly why NATURAL is risky under schema change.