如何同时执行两条sql语句

2025-03-04 17:55:30
推荐回答(5个)
回答1:

select s.wkid,s.wkname,t.retime ,t.traffic*60
from river_calresult t,ph_duanm_weikou s
where t.rno=s.dmno and t.overflowflag=3

union
{

select s.wkid,s.wkname,t.retime ,t.traffic*60
from river_calresult t,ph_duanm_weikou s
where t.rno=s.dmno and t.overflowflag=s.shore
group by( s.wkid,s.wkname,t.retime ,t.traffic*60)

}

回答2:

同时选中,点击运行按钮,就可以执行

回答3:

select s.wkid,s.wkname,t.retime ,t.traffic*60
from river_calresult t,ph_duanm_weikou s
where t.rno=s.dmno and t.overflowflag=3

union

select s.wkid,s.wkname,t.retime ,t.traffic*60
from river_calresult t,ph_duanm_weikou s
where t.rno=s.dmno and t.overflowflag=s.shore
group by( s.wkid,s.wkname,t.retime ,t.traffic*60)

回答4:

用union 或 union all将两个SQL串起来
union会消除重复资料
union all不会消除重复资料

回答5:

使用union all,你可以调试下。