CREATE DEFINER=123
@%
PROCEDURE proc1
()
begin
set @a=26541;
set @array_content = (SELECT GROUP_CONCAT(station_code)
FROM
T_BASE_STATION
WHERE FIND_IN_SET(2,monitor_method));
set @cc = (SELECT COUNT(*)
FROM
T_BASE_STATION
WHERE FIND_IN_SET(2,monitor_method));
start transaction ;
while @a<=1026549 do
UPDATE STATUS
SET station_code
= 1 WHERE id
= @a;
set @a=@a+1;
end while;
COMMIT;
end
网友评论