【发布时间】:2018-02-14 05:43:18
【问题描述】:
我已经创建了一个程序:
Create or Replace Procedure GetTotalEmployeesByDepartment
(
deptno in Employees.Department_Id%Type,
totalEmployees out number
)
as
begin
select cout(*) into totalEmployees from Employees
where Department_Id = deptno;
end;
/
结果:
Warning: Procedure created with compilation errors.
当我输入时:
show errors;
显示的命令行:
LINE/COL ERROR
8/1 PL/SQL: SQL Statement ignored
8/13 PL/SQL: ORA-00936: missing expression
你知道什么地方会出错吗?为什么 SQL 忽略“cout”语句而缺少“*”?
【问题讨论】: