NIUCLOUD是一款SaaS管理后台框架多应用插件+云编译。上千名开发者、服务商正在积极拥抱开发者生态。欢迎开发者们免费入驻。一起助力发展! 广告
**遍历整个表** ``` create procedure test() begin declare mini int default 0; declare max int default 0; select min(id) into mini from a; select max(id) into max from a; repeat if mini % 2 =0 then update a set sex = mini where id=mini; end if; set mini=mini+1; until mini>max end repeat; end $$;