多表中需要对各表中的数据量进行统计, select (select count(*) from oa_gwgl_fwgl_state) as fw,
(select count(*) from oa_gwgl_swgl_state) as sw ,
(select count(*) from oa_gwgl_fzswgl_state) as fz ,
(select count(*) from oa_ldsw_ldcy_state) as ld ,
(select count(*) from oa_t_form_flow) as ff from DUAL
此方法可以统计各个表的数据量,
不过我还需要他们的和。 怎么写???还有没有其它效率高的语句?
(select count(*) from oa_gwgl_swgl_state) as sw ,
(select count(*) from oa_gwgl_fzswgl_state) as fz ,
(select count(*) from oa_ldsw_ldcy_state) as ld ,
(select count(*) from oa_t_form_flow) as ff from DUAL
此方法可以统计各个表的数据量,
不过我还需要他们的和。 怎么写???还有没有其它效率高的语句?
(select count(*) from oa_gwgl_swgl_state) as sw ,
(select count(*) from oa_gwgl_fzswgl_state) as fz ,
(select count(*) from oa_ldsw_ldcy_state) as ld ,
(select count(*) from oa_t_form_flow) as ff,(select count(*) from oa_gwgl_fwgl_state) +
(select count(*) from oa_gwgl_swgl_state) +
(select count(*) from oa_gwgl_fzswgl_state) +
(select count(*) from oa_ldsw_ldcy_state) +
(select count(*) from oa_t_form_flow) as total
from DUAL