I have several databases on one server which I can access with no problem. two of the databases have the exact same files. One is a Master and the other is a sandbox which I can mess up or change data for testing purposes. How would I code it if I want to
see in each of the student files the personid field side by side.
you requirement is not much clear. You can always access data from other database on same server if you are having permissions. You will need to use FQDN for tghis like [dbname].[schemaname].[tablename] e.g [employee].[hr].[salary]
Your question is not clear but I think you are looking for a JOIN to the 2 tables on personid. Depending on the results you want to see exactly it could be a inner join, outer join, left join, or right join. Please provide more info. What output
are you looking for?