create or REPLACE procedure proc_alt
as
cursor cur_query is
SELECT * FROM pet
inner join pet_type
on pet.petid = pet_type.ids;
begin
--打开游标
from item in cur_query loop
dbms_output.put_line('宠物编号:'||item.pet_ids||',宠物名称:'||item.Pet_petname||',宠物类型:'||item.type_peytype||',宠物生命:'||item.pet_petpower);
end loop;
CLOSE cur_query;
end;错误(11,3): PLS-00103: 出现符号 "FROM"在需要下列之一时: begin case declare exit for goto if loop mod null pragma raise return select update while with <an identifier> <a double-quoted delimited-identifier> <a bind variable> << close current delete fetch lock insert open rollback savepoint set sql execute commit forall merge pipe 符号 "for在 "FROM" 继续之前已插入。
as
cursor cur_query is
SELECT * FROM pet
inner join pet_type
on pet.petid = pet_type.ids;
begin
--打开游标
from item in cur_query loop
dbms_output.put_line('宠物编号:'||item.pet_ids||',宠物名称:'||item.Pet_petname||',宠物类型:'||item.type_peytype||',宠物生命:'||item.pet_petpower);
end loop;
CLOSE cur_query;
end;错误(11,3): PLS-00103: 出现符号 "FROM"在需要下列之一时: begin case declare exit for goto if loop mod null pragma raise return select update while with <an identifier> <a double-quoted delimited-identifier> <a bind variable> << close current delete fetch lock insert open rollback savepoint set sql execute commit forall merge pipe 符号 "for在 "FROM" 继续之前已插入。
解决方案 »
- Linux Oracle Weblogic Brio8 Windows 2003 这五个软件(系统)的服务期限问题
- 大侠求助,关于rman备份的问题。
- 怎么查看oracle dump后的文件?
- oracle form的button的名字很长,怎么换行
- oracle分析函数为何不能在存储过程中使用
- informix create view 问题
- 求大神指点oracle挂死的问题ORA-00600: internal error code, arguments: [2023], [0],
- 一个菜鸟问题!
- 本人面试的一道题目,请大家积极参加
- win8 安装oracle11后监听服务启动不了
- oracle function怎么写
- 安装oracle 11g发行版,配置安全更新点击下一步出错
FROM ITEM IN CUR_QUERY
--修改为:
FOR ITEM IN CUR_QUERY--删除:CLOSE cur_query; 因为for 循环对游标自动打开自动关闭。
改为
for item in cur_query loop
1)from item in cur_query loop
改为:for ittem ....
2)把CLOSE cur_query删除