SQL Inner Join Linking PO to Project

I am trying to join the two tables Project and PORel to see which PO’s have been attached to the Project. I tried doing an inner join on the two tables in SQL but can’t seem to find which two table/field will join them correctly. Is there a way to find out which table/field to use to do the sql join? Example of sql query so far…

select * from erp.project inner join erp.porel on erp.project.ProjectID=erp.porel.PORelNum

Try
erp.project.ProjectID=erp.porel.ProjectID

1 Like

Thanks, that worked. How did you determine to use ProjectID as the link? I often find it difficult to know which two fields to link the two tables.