呵呵。如果没理解错的话光用in是得不出楼主要的效果的。select test_id from tab_test where (test_name='zsg1' and test_desc='tttt1') or (test_name='zsg2' and test_desc='tttt2') group by test_id having count(*)>1;
应该只用下面的语句就可以了: select test_id from tab_test where (test_name='zsg1' and test_desc='tttt1') or (test_name='zsg2' and test_desc='tttt2')
select test_id from tab_test where (test_name='zsg1' and test_desc='tttt1') or (test_name='zsg2' and test_desc='tttt2')