SHOW TRIGGERS; show procedure status;
4. 为批量插入编写存储过程:
DROP procedure createUsers;
delimiter |
create procedure createUsers(IN count int)
begin
declare i int;
set i=0;
while i
set i=i+1;
end while;
end;
5. 调用存储过程,验证存储过程是工作的,并验证在插入记录前,触发器能正确被触发:
call createUsers(10);
6. 最后通过插入记录表再次验证:
SELECT * FROM mars_jpa.airuser_record;
bitsCN.com
Copyright © 2019- worldimage.cn 版权所有 湘ICP备2024080961号-5
违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com
本站由北京市万商天勤律师事务所王兴未律师提供法律服务