如何在oracle中看到以下代码的输出并调用它?
DECLARE
c_id e.id%type;
c_name e.name%type;
CURSOR c_e is
SELECT id, name FROM e;
BEGIN
OPEN c_e;
LOOP
FETCH c_e into c_id, c_name;
dbms_output.put_line(c_id||' '||c_name);
EXIT WHEN c_e%notfound;
END LOOP;
CLOSE c_e;
END;
/
答案 0 :(得分:0)
试
create or replace procedure test_out
begin
DECLARE
c_id e.id%type;
c_name e.name%type;
CURSOR c_e is
SELECT id, name FROM e;
BEGIN
OPEN c_e;
LOOP
FETCH c_e into c_id, c_name;
dbms_output.put_line(c_id||' '||c_name);
EXIT WHEN c_e%notfound;
END LOOP;
CLOSE c_e;
END;
end;
exec test_out;