DO --关键字 $serch$ --$中间随便写, 不能用特殊符号和数字好像$ DECLARE times integer; --定义变量 rec history_depart%ROWTYPE; -- 定义行变量 BEGIN times := 0; FOR rec in SELECT * FROM history_depart WHERE person_id = 5655 LOOP --几种循环的一种 循环查到的结果 另几种查看 https://www.cnblogs.com/stephen-