MySql由于编码问题,存储过程执行出错。
在存储过程后面加了一段话。红色部分
DELIMITER $$
USE `mysql_wispeed01-test1`$$
DROP PROCEDURE IF EXISTS `sp_crebillno`$$
CREATE DEFINER=`sa`@`%` PROCEDURE `sp_crebillno`(IN ntype VARCHAR(10),IN comid INT)
BEGIN
UPDATE cdbill_num SET lastnum=IFNULL(LastNum,0)+1 WHERE companyid=comid AND NumType=ntype COLLATE utf8_croatian_ci;
SELECT CONCAT( RTRIM(AddPR),RIGHT(10000000+IFNULL(LastNum,1),7)) AS BillNo FROM cdbill_num WHERE companyid=comid AND NumType=ntype COLLATE utf8_croatian_ci;
END$$
DELIMITER ;