我想更改定界符:
有人可以帮我在Oracle 11g中更改sqlplus中的分隔符吗?
Can someone help me to change the delimiter in sqlplus in Oracle 11g
CREATE OR REPLACE TRIGGER test_trigger BEFORE INSERT ON test REFERENCING NEW AS NEW FOR EACH ROW BEGIN SELECT test_sequence.nextval INTO :NEW.ID FROM dual; END; /这是我要创建的触发器.但是在Select语句之后它由于停止;在那儿.这就是为什么我想更改定界符.希望大家现在都明白这一点.
this is the trigger I want to create. but after Select statement it stops because of ; is there. that is why I want to change the delimiter. I hope everyone gets the idea on this now..
推荐答案触发器的语法没有错.我可以在我的(原始)SQL * Plus环境中运行它:
There is nothing wrong with the syntax of your trigger. I can run it in my (vanilla) SQL*Plus environment:
SQL> CREATE OR REPLACE TRIGGER test_trigger 2 BEFORE INSERT ON test 3 REFERENCING NEW AS NEW FOR EACH ROW 4 BEGIN 5 SELECT test_sequence.nextval INTO :NEW.ID FROM dual; 6 END; 7 / Trigger created. SQL>哦!触发器起作用:
SQL> insert into test (col1) values ('Simples!') 2 / 1 row created. SQL> select * from test 2 / ID COL1 ---------- ------------ 1 Simples! SQL>我能想到的是您正在键入的代码中有一些空行.如果是这种情况,您可以使用以下SQL * Plus命令覆盖默认行为:
All I can think is that you have some blank lines in the code which you are typing. If this is the situation you can override the default behaviour with this SQL*Plus command:
SQL> set sqlblanklines on更多推荐
如何在oracle 11g中的sqlplus中更改定界符
发布评论