PL/SQL没有你说的那种功能,只能手动进行规范语句格式。 例如:游标应用 declare cursor c1 is select * from 表 where 条件 order by 字段 for update of 字段; v c1%rowtype; begin open c1; loop fetch c1 into v; exit when c1%notfound; if 条件 then 语句 else 语句 end if; 语句 end loop; close c1; COMMIT; exception when OTHERS then 异常处理语句 end;