BMK BMK - 3 months ago 12
SQL Question

How to get attribute from foreign key

If I have a foreign key how do I get an attribute from the data object?

For example I want to have data objects that gives me the id for 'a', but I then want to get the name from 'a' and not just the referenced id?

Such as select a_ID from rTable - this gives me the id of the object, but how do I then get the name attribute from that reference id?


use inner join for Example

select , from Table1 inner join Table2 on Table1.FK==Table2.ID

Check this link SQL - INNER JOINS