Are you wondering about joins? You can join the two tables using the foreign key for example like:
SELECT *
FROM Test1 INNER JOIN Test2
ON Test1.TestID = Test2.TestID
That would bring all the matching rows. For information about joins, see:
http://www.w3schools.com/sql/sql_join.asp[
^]