将选择中TableName有匹配记录的记录TableName1。
SELECT * FROM TableName t WHERE EXISTS ( SELECT 1 FROM TableName1 t1 wheret.Id= t1.Id)