SELECT * FROM table1 WHERE id IN (SELECT id FROM table2);
select * from table1 where name="Петя" or name="Вася".
jingvarКак реализовать
jingvarИли