I want to write a While Loop with Events in MySQL. After searching the internet, unfortunately, i didn't find something like this. However, i don't want to write it using procedures.
CREATE DEFINER=`root`@`localhost` EVENT `try`
ON SCHEDULE EVERY 1 DAY STARTS '2023-03-10 09:00:00.000000'
ON COMPLETION NOT PRESERVE ENABLE DO
BEGIN
DECLARE counter int DEFAULT 1;
WHILE counter <= 10 DO
INSERT INTO admin(admin.admin_username, admin.admin_password, admin.admintype_id) VALUES('aaaa','bbbb',1)
SET counter = counter + 1;
END WHILE
END;