Hi Priya,
Krishna is exactly right, if you have both table1 and table2 in the foundation of your attribute view and you have table1 joined to table2 based upon ID field; if you click the link between the two tables for ID field you should see JOIN TYPE. If this is INNER join then you should get the results you are looking for.
-Patrick