select * from table where id in (1,2,4,5,6);

2025-12-06 03:24:50
推荐回答(3个)
回答1:

select * from table
where id in (select id from table
where id in (1,2,4,5,6)
group by id
having count(id) > 5)

回答2:

select * into #t from table where id in (1,2,4,5,6);
select * from table where id in (1,2,4,5,6) and (select count(distinct id) from #t)>5

回答3:

没明白,是要么全查,要么不查么?