MySQL存储过程 调用报错 求错误原因?
创建存储过程:CREATEPROCEDUREaddspman(INi_accountVARCHAR(20),i_nameVARCHAR(60),i_mobileVARCH...
创建存储过程:
CREATE PROCEDURE addspman(IN i_account VARCHAR(20),i_name VARCHAR(60),i_mobile VARCHAR(14) ,OUT addman SMALLINT UNSIGNED,OUT mancounts SMALLINT UNSIGNED)
BEGIN
INSERT wc_spman (account,name,mobile) VALUES(account=i_account,name=i_name,mobile=i_mobile);
SELECT ROW_COUNT() INTO addman;
SELECT COUNT(account) INTO mancounts;
END
调用存储过程:
CALL addspman(123123,'yuyulong',13800138000,@a,@b);
报错:
ERROR 1062 (23000): Duplicate entry '0' for key 'uni_cr_mobile'
求错误原因和修改方法! 展开
CREATE PROCEDURE addspman(IN i_account VARCHAR(20),i_name VARCHAR(60),i_mobile VARCHAR(14) ,OUT addman SMALLINT UNSIGNED,OUT mancounts SMALLINT UNSIGNED)
BEGIN
INSERT wc_spman (account,name,mobile) VALUES(account=i_account,name=i_name,mobile=i_mobile);
SELECT ROW_COUNT() INTO addman;
SELECT COUNT(account) INTO mancounts;
END
调用存储过程:
CALL addspman(123123,'yuyulong',13800138000,@a,@b);
报错:
ERROR 1062 (23000): Duplicate entry '0' for key 'uni_cr_mobile'
求错误原因和修改方法! 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询