mysql中查询两个表同一条件的数据条数该怎么写sql语句

2024-11-30 08:50:41
推荐回答(1个)
回答1:

select count(1)
from
(
select id
from a
where id>5
union all
select id
from b
where id>5
)