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;