oracle触发器查询问题
谁能告诉我这个查询有什么问题吗?
create trigger Test_trigger
before insert on Test for each row
begin select TestSequence.nextval into :new.id from dual;
end;/
当我运行此查询时,出现以下错误:
第 1 行出现错误:PLS-00103:当预期出现以下情况之一时遇到符号“文件结束”:
;
符号“;”被替换为“文件结束”以继续。
我使用的是 Oracle 10g Express 版。
Can anyone please tell me what is wrong with this query?
create trigger Test_trigger
before insert on Test for each row
begin select TestSequence.nextval into :new.id from dual;
end;/
When I run this query, I get the following error:
ERROR at line 1: PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:
;
The symbol ";" was substituted for "end-of-file" to continue.
I am using Oracle 10g Express Edition.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
结尾的“/”是 SQL*Plus 语法。您可能正在使用 Oracle Apex 中的 SQL 工具 - 在这种情况下,请省略“/”。
The trailing "/" is SQL*Plus syntax. You're probably using the SQL tool in Oracle Apex - in which case, omit the "/".
如果你删除末尾的“/”,它应该可以工作。
It should work if you remove the "/" at the end.
这是我尝试执行的脚本:
Here is the script I'm trying to execute: