幕布斯7119047
用存储过程算了,函数不能返回一个值,如果要返回多值的话,那就返回一个table,用存储过程同样能达到效果 CREATE PROCEDURE `goodcheck`( in xxx int in xxx ... out xxx .. out xxx char ) begin select sum(productstockinfo.num) into production from productstockinfo where pro_id=productId;