sql中的字符报错 - 大家帮忙看看

shenghuiping2001 2011-10-18 07:36:13
我写了个procedure:

begin
loop
for i in 1 .. 10000
insert into emp values (i,'zhangshan');
end loop;
commit;
end;
/

报错:

ERROR at line 3:
ORA-06550: line 3, column 1:
PLS-00103: Encountered the symbol ";" when expecting one of the following:
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

大家有没有碰到这种问题啊?
...全文
53 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
badiku 2011-10-18
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 jamig 的回复:]

你没有在for i in 1 .. 10000
后面加loop
[/Quote]

哈哈,他写了loop的,只是位置写错了。
Rotel-刘志东 2011-10-18
  • 打赏
  • 举报
回复
是否执行此语句权限的。
jamig 2011-10-18
  • 打赏
  • 举报
回复
你没有在for i in 1 .. 10000
后面加loop

17,377

社区成员

发帖
与我相关
我的任务
社区描述
Oracle 基础和管理
社区管理员
  • 基础和管理社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧