SELECT * FROM tab1 a, tab2 b WHERE a.id=b.id ecc....