spplus

存储过程实例:

DELIMITER $$
drop procedure if exists ff $$
CREATE

/*[DEFINER = { user | CURRENT_USER }]*/
PROCEDURE ff()
/*LANGUAGE SQL
| [NOT] DETERMINISTIC
| { CONTAINS SQL | NO SQL | READS SQL DATA | MODIFIES SQL DATA }
| SQL SECURITY { DEFINER | INVOKER }
| COMMENT \'string\'*/
BEGIN
declare i integer;
declare am integer;
declare idx integer;
set idx=512;
set am=100;
set i=0;
while i<303 do
begin

if idx != 612
then
update mgrcapitaldf set balance=balance+am*i where id=idx;
set i = i +1;
end if;

set idx = idx+1;

end;
end while;

END$$

DELIMITER ;

 

-- 调用方法:

call ff();

分类:

技术点:

相关文章:

  • 2021-11-23
  • 2021-08-10
  • 2021-07-09
  • 2022-01-02
  • 2021-11-17
  • 2021-11-27
  • 2022-01-01
  • 2022-01-01
猜你喜欢
  • 2021-12-23
  • 2021-12-23
  • 2021-12-23
  • 2021-12-23
  • 2021-05-01
  • 2021-11-26
  • 2021-07-06
相关资源
相似解决方案