读书人

请问Informix 数据库 对 union 的结果

发布时间: 2012-03-15 11:50:38 作者: rapoo

请教Informix 数据库 对 union 的结果 做count??
select count(*) from (select * from a union select * from b ) c 居然不行!!!请教高人该怎么写? 不要into 临时表再count.


[解决办法]
你的目的是什么?
要两个表的总和?
[解决办法]
你的版本是什么?

select * from a union select * from b
是否能执行?
[解决办法]
试试 select((select count(*) from a) + select count(*) from b)) from systables where
tabid = 1

读书人网 >Informix

热点推荐