(no title)
dmfay
|
4 years ago
You may be interested in the USING clause SQL-92 added for foreign keys where the referencing columns have the same name as the referenced columns: JOIN b USING (a_id). The only major RDBMS that doesn't support it is SQL Server afaik.
JoelJacobson|4 years ago
Example:
Works fine, but if we do Then we get The foreign key based join approach doesn't suffer from this problem, since there which columns to join on is explicit and stable.