Last answered:

08 Apr 2023

Posted on:

01 Apr 2023


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 correct me.

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)
Select emp_no into p_emp_no
from employees e
where e.first_name = p_first and e.last_name = p_last;
end $$

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

1 answers ( 0 marked as helpful)
Posted on:

08 Apr 2023


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.

Can you please also double check what code you had written during the session prior to the first query you've mentioned?

Hope this helps.

Submit an answer