I have an Stored Procedure which does make an UPDATE for more than one rows. But it doesn't work. Below is the code:
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
I want to know is it possible to make a loop inside?
Thanks in advance