I have a table where some rows have a field referencing another row in the same table through a foreign key. I would like to perform a select that returns another field from the referenced row instead of the meaningless key value.
Is there a way of doing this simply by somehow exploiting the foreign key or do I have to perform a join matching the fields as if no foreign key existed?
You’ll need to self-join the table on the foreign key, give distinct names to both table copies, and then select the field you want: