I have a variable @ids = "894,891,896,899..."
What I like to do is the following
loop @id: @ids
INSERT INTO `testcases_types` (`testcase_id`, `type_id`) VALUES (@id, '57');
INSERT INTO `testcases_types` (`testcase_id`, `type_id`) VALUES (@id, '58');
INSERT INTO `testcases_types` (`testcase_id`, `type_id`) VALUES (@id, '59');
INSERT INTO `testcases_types` (`testcase_id`, `type_id`) VALUES (@id, '60');
end loop
So I tried a lot now , but I cannot find out the right syntax. I do not want to write a procedure. I just want to execute it once .