MySQL 5.0 存储过程

关于NOT FOUND的处理:

    DECLARE c int default 0;
    DEClARE v_staff_id int default 0;

    DECLARE CONTINUE HANDLER FOR NOT FOUND Set c = 1;

    select staff_id into v_staff_id from tr_staff where staff_id = 0;

    select c;

    select staff_id into v_staff_id from tr_staff where staff_id = 100;

    select c;

相关文章:

  • 2022-01-02
  • 2021-10-28
  • 2022-01-02
  • 2021-11-04
  • 2021-06-23
猜你喜欢
  • 2022-12-23
  • 2021-07-11
  • 2022-12-23
相关资源
相似解决方案