请高手指教一二:有关数据列进行统计的问题?
我这里有两张表:日期表:H200410和人员信息表pinf,以这两个表中的编号字段为连接条件,我想同时统计出在H200410表中的编号(bh)字段的不同记录数和H200410表中的日期(day)字段的不同记录数和pinf表中部门(bm)字段的不同记录数,并将统计结果放在一个结果集中,以便以后同时对这个结果进行操作,取出其中的统计结果? 问题点数:0、回复次数:2Top
1 楼dragon1975(龙)回复于 2004-11-04 21:10:20 得分 0
select a.*, b.* from (
select count(*) from h200410 group by bh) a,
(select count(*) from h200410 group by day) b,
(select count(*) from pinf group by bm) cTop
2 楼dragon1975(龙)回复于 2004-11-04 21:10:39 得分 0
select a.*, b.*, c.* from (
select count(*) from h200410 group by bh) a,
(select count(*) from h200410 group by day) b,
(select count(*) from pinf group by bm) c
Top




