CREATE DEFINER=`root`@`localhost` PROCEDURE `auuid`()
BEGIN
DECLARE i INT ( 4 );
set i=1;
WHILE i <> 300 DO
set i=i+1 ;
UPDATE table_name set auuid = REPLACE(UUID(),'-','') where id=(SELECT min(id) from (select id from table_name WHERE auuid = "5") as A);
END WHILE;
END
网友评论