set serveroutput on
declare
--游标类型定义
cursor table_cur
is
select Material and Formula from "Table_1"
WHERE 'Calculate'='是';
--定义一个游标变量table_row table_cur%ROWTYPE ,该类型为游标table_cur中的一行数据类型
table_row table_cur%rowtype;
begin
--游标for循环开始
for table_row in table_cur loop
dbms_output.put_line(table_row.Material||'-'||table_row.Formula);
end loop;
----游标for循环结束
close table_cur;
end;
这段SQL 放到Command Windows里 显示的是 空,是因为有错误吗?
如果放到SQL里的话只能把 set serveroutput on删除掉才不报错,但是不显示输出结果,是代码有问题吗?