Skip to content
Advertisement

Tag: tsql

Foreign Key Refers the Primary Key Columns of Same Table

I have two tables like this: Table 1 – CivilOffices Table 2 – Offices I want to query all the offices with their respective parent office name. But when I tried to query this, the query returns the parent office id instead of parent office name. Here is the query I used. Here is the result Instead, I want result

Advertisement