1个回答
展开全部
你第一个截图那张,with用的是sqlserver的语法,你用到oracle里当然不行
oralce里使用是这样的
select a.provider,a.materialno,sum(a.quantity)
from tb a group by rollup(a.provider,a.materialno)
后一个cmd下的语法,也是sqlserver或者access,或者mysql,总之不是oracle里的语法
oracle下这样
insert into tb
select 'Canon','001',500 from dual
union all
select 'Canon','001',200 from dual
union all
select 'Canon','002',100 from dual
union all
select 'Canon','002',300 from dual
union all
select 'Sony','001',200 from dual
union all
select 'IBM','002',100 from dual
union all
select 'IBM','001',600 from dual
union all
select 'IBM','002',200 from dual;
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询