Let there are 2 tables. To query the rows, which have the same IDs, you have to do this:
SELECT * FROM Table1 A, Table2 B WHERE A.id = B.id
Now let the tables be merged into one global table, with an added ex-table column. So, query
SELECT * FROM Table1
now looks like:
SELECT * FROM GlobalTable WHERE tableId = 1
But how the first query should look now?
SELECT * FROM Table1 A, Table2 B WHERE A.id = B.id
?