Is it possible to get information about whether a child table has reference to a parent table through a certain record? For example, tblParent has a record whose primary key value is 5. I want to know whether tblChild_A, tblChild_B and tblChild_C have one or more records in them where the foreign key value is 5. Well it's definitely possible by querying each of the child tables individually but I want to know whether there's any system query or stored procedure or whatever that produces a tabular output from all those tables together.
If it's possible in MS SQL Server then please also inform what's its counterpart in MS Access. Regards.
How to get reference information between parent and child tables (MS SQL Server/MSAccess)?
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Posted Jun 13, 2011, 10:31 PM EDT
select
e.EmployeeName,
e.CityID,
C.CityName,
e.StateID,
S.StateName
from
Employee e
inner join City C on c.CityID=e.CityID
inner join State S on s.StateID = e.StateID
Hope this helps you.