Last answered:

03 Apr 2023

Posted on:

01 Apr 2023

1

Error code 1318 during execution of the code.

I am getting an error during calling of the procedure,  the error states "Error Code: 1318. Incorrect number of arguments for PROCEDURE employees.emp_info; expected 2, got 3", please analyze.


DELIMITER $$
use employees $$
drop procedure emp_info $$
Create procedure emp_info(IN p_first varchar(18), IN p_last varchar(18), out p_emp_no int)
begin
Select emp_no into p_emp_no
from employees e
where e.first_name = p_first and e.last_name = p_last;
end $$
DELIMITER ;



SET @v_emp_no = 0;
CALL emp_info("Aruna", "journel", @v_emp_no);
SELECT @v_emp_no;

1 answers ( 0 marked as helpful)
Instructor
Posted on:

03 Apr 2023

0

Hi Barun!
Thanks for reaching out.


I tested your code and it works fine. Please, open a new tab and try the same code. Sometimes, this resolves similar issues.


Hope this helps.
Best,
Tsvetelin

Submit an answer