1

我把这段代码变成了一个程序:

declare counter int unsigned;
declare amount int unsigned;

set counter := 0;
set amount := 3;

while counter <> amount
do
    set counter := counter + 1;
    insert into tablename (column) values (1);
end while;

我期望这会产生三个插入的循环,但它会生成五到六个插入。我在哪里做错了?

4

0 回答 0