我有一个存储过程,它确实对多行进行了更新。但它不起作用。下面是代码:
DELIMITER $$
CREATE PROCEDURE `dbnine`.`vacores` ()
BEGIN
SET @a = (
SELECT acores from infos_bureau
where agent = '');
SET @b = (
SELECT DISTINCT agent from infos_bureau
where acores = @a
AND agent !='');
UPDATE infos_bureau set agent = @b
WHERE agent = '';
END
我想知道是否可以在里面做一个循环?
提前致谢