Error Code: 1318. Incorrect number of arguments for PROCEDURE company.new_procedure; expected 2, got

878 ワード

1、エラーの説明
20:27:34	call new_procedure(20150112)	Error Code: 1318. Incorrect number of arguments for PROCEDURE company.new_procedure; expected 2, got 1	0.000 sec
1 queries executed, 0 success, 1 errors, 0 warnings

  :call query_student()

    : 1318
Incorrect number of arguments for PROCEDURE test.query_student; expected 1, got 0

       : 0 sec
       : 0 sec
         : 0 sec

2、エラーの原因
CREATE DEFINER=`root`@`localhost` PROCEDURE `new_procedure`(in `departId` int,out `num` int)
BEGIN

  select count(t.depart_name) into num from t_department_info t where t.depart_id = departId;
  

END
call new_procedure(20150112);

ストレージの呼び出し中に2つのパラメータを入力する必要がありますが、1つのパラメータしか送信されません.
3、解決方法
call new_procedure(20150112,@num);