create or replace procedure pro_temp is
--让游标变量 cu_test 指向一个动态select查询的结果集
cursor cu_test is select * from t_test;
begin
--循环开始
for e in cu_test loop
if e.ENAME = 'liuming' then
dbms_output.put_line('刘明' || ' - ' || e.JOB);
elsif e.ENAME = 'zhangsan' then
dbms_output.put_line('张三' || ' - ' || e.JOB);
else
dbms_output.put_line(e.ENAME || ' - ' || e.JOB);
end if;
--循环结束
end loop;
end pro_temp;