PLS-00306: wrong number or types of arguments in call to 'NAME'
The call does not match any version of the procedure or function: the number of arguments is wrong, or a type does not fit. Compare the call with the current specification.
What PLS-00306 means
PL/SQL matches a call against the declared parameters of a subprogram, including all overloads in a package. If no version fits, it reports PLS-00306 with the name. It often appears after a package specification changed while the calling code stayed the same.
Common causes of PLS-00306
- Too many or too few arguments.
- An argument of the wrong type, such as a record where a scalar is expected.
- A named parameter that does not exist:
p_idd => 1. - A changed package specification, or a call against an older version in another schema.
How to fix PLS-00306
- Look at the current parameters:
DESC package_nameorALL_ARGUMENTS. - Use named notation: it is easier to read, and it reveals wrong names at once.
- Convert the arguments explicitly if a type does not fit.
- Check which schema’s object the call really resolves to.
PLS-00306 example
LENGTH takes one argument:
DECLARE
x NUMBER;
BEGIN
x := LENGTH('a', 'b');
END;
/
-- ORA-06550: line 4, column 8:
-- PLS-00306: wrong number or types of arguments in call to 'LENGTH'
Current signature of a stored unit:
SELECT argument_name, position, data_type, in_out
FROM all_arguments
WHERE package_name = 'PKG_SALARY'
AND object_name = 'CALC'
ORDER BY overload, position;
In SQLlightspeed
When a statement fails, SQLlightspeed’s error panel shows the error code with a plain-language explanation and a suggestion for what to do next, together with Oracle’s own message and a link to Oracle’s documentation — for this error and dozens of other common ones.
Related errors
PLS-00201ORA-06550ORA-06502 All Oracle errors →
Oracle documentation for PLS-00306. Oracle is a registered trademark of Oracle Corporation. SQLlightspeed is not affiliated with Oracle.