Oracle 脚本问题 - 创建触发器未终止
我正在尝试对 Oracle 数据库进行一些更改,并编写一个脚本来执行此操作。问题是,当它到达脚本中创建触发器的某个点时,创建触发器块似乎没有正确终止,当我之后查看触发器时,它包含脚本中的所有剩余代码。
这就是我所拥有的:
CREATE OR REPLACE TRIGGER user_publish_log_trg
BEFORE INSERT ON USER_PUBLISH_LOG
FOR EACH ROW
BEGIN
SELECT user_publish_log_seq.NEXTVAL INTO :NEW.Id FROM dual;
END user_publish_log_trg;
CREATE TABLE USER_APPROVAL_LOG
(
Id number(10) NOT NULL ,
CommodityId number(10) NOT NULL,
QuarterEndDate DATE NOT NULL,
ActionId int NOT NULL ,
...
结束触发器时我做错了什么?
I am trying to make some changes to an oracle database and have a script put together to do so. The problem is when it gets to a point in the script where I am creating a trigger it seems like the Create Trigger block does not properly terminate, when I look at the trigger afterwards it contains all of the remaining code in the script.
This is what I have:
CREATE OR REPLACE TRIGGER user_publish_log_trg
BEFORE INSERT ON USER_PUBLISH_LOG
FOR EACH ROW
BEGIN
SELECT user_publish_log_seq.NEXTVAL INTO :NEW.Id FROM dual;
END user_publish_log_trg;
CREATE TABLE USER_APPROVAL_LOG
(
Id number(10) NOT NULL ,
CommodityId number(10) NOT NULL,
QuarterEndDate DATE NOT NULL,
ActionId int NOT NULL ,
...
What am I doing wrong in ending the trigger?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要在新行上使用斜杠来终止 PL/SQL,如下所示:
You need to terminate the PL/SQL by using a slash on a new line, like this: