创建带有多个OUT类型参数的存储过程-报错1172 - Result consisted of more than one row
mysql> CREATE PROCEDURE RmUserByAge_Infos(IN p_age SMALLINT UNSIGNED,OUT deleteUsers SMALLINT UNSIGNED,OUT userCounts SMALLINT UNSIGNED)
-> BEGIN
-> DELETE FROM users WHERE age = p_age;
-> SELECT ROW_COUNT() FROM users INTO deleteUsers;
-> SELECT COUNT(id) FROM users INTO userCounts;
-> END
-> //
Query OK, 0 rows affected
mysql> CALL RmUserByAge_Infos(23,@user,@num);
1172 - Result consisted of more than one row
mysql> SELECT @user;
+-------+
| @user |
+-------+
| NULL |
+-------+
1 row in set
mysql> SELECT @num
;
+------+
| @num |
+------+
| NULL |
+------+
1 row in set
数据已经被删除,但参数不能正确的返回,请教一下,这是怎么回事呢?要如何解决呢?