foreach MySQL以获取特定编号列表

时间:2019-01-18 16:35:01

标签: mysql loops for-loop select foreach

我想在mysql中编写一个foreach循环。这里是半代码:

numbers = {1,5,3,7,10};
for(number:numbers)
SET @numbers_status := (select * from status where numberId = $number)
// update a table using @numbers_status and $number

0 个答案:

没有答案