如何在mysql中执行数据循环?在oracle中,我可以做到:
for i_rec in (Select * from passwords2) loop null; end loop;
mysql中的类似功能是什么?
mrwjdhj31#
请检查https://dev.mysql.com/doc/refman/5.7/en/loop.html
[begin_label:] LOOP statement_list END LOOP [end_label]
你应该把for循环放在语句列表中for循环可以使用游标实现:https://dev.mysql.com/doc/refman/8.0/en/cursors.html
1条答案
按热度按时间mrwjdhj31#
请检查https://dev.mysql.com/doc/refman/5.7/en/loop.html
你应该把for循环放在语句列表中
for循环可以使用游标实现:https://dev.mysql.com/doc/refman/8.0/en/cursors.html