Reputation: 153
I've created a procedure:
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;
/
with result:
Warning: Procedure created with compilation errors.
As I typed:
show errors;
Command line shown:
LINE/COL ERROR
8/1 PL/SQL: SQL Statement ignored
8/13 PL/SQL: ORA-00936: missing expression
Do you know what may goes wrong? Why SQL ignose "cout" statement and missing "*"?
Upvotes: 0
Views: 55