28,391
社区成员
发帖
与我相关
我的任务
分享
select sum(f1) from (
select count(*) as f1 from 表1 where 字段1=false
union all
select count(*) from 表2 where 字段2=true
union all
select count(*) from 表3 where 字段3=2
)
大概上面这样,没调试,不懂是否正确[/quote]
版主老大,我是菜鸟中的小鸟,你可以将完整的代码写个我参考下吗?这样我也不知道调用怎样写,谢谢了
select sum(f1) from (
select count(*) as f1 from 表1 where 字段1=false
union all
select count(*) from 表2 where 字段2=true
union all
select count(*) from 表3 where 字段3=2
)
大概上面这样,没调试,不懂是否正确