创建一个不带参数的存储过程,从emp表中找出30号部门人数之和和工资之和,并存入临时表temp中。

其中临时表的结果为temp(deptno number(2),count number(2),total_sal number(7,2))。在线等,谢谢了。

第1个回答  推荐于2020-12-21
create proc CONTUN_EMP
AS
SELECT deptno, count(empid) as count ,sum(工资)as total_sal
into #temp
from emp where deptno='30'
group by deptno

select *from #temp
go本回答被提问者采纳
第2个回答  2012-05-30
select deptno, [count ],[total_sal ] into #temp from [数据来源的集合]