469,330 Members | 1,280 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,330 developers. It's quick & easy.

Command hangs and doesn't end.

101 100+
I'm using this statement to create a trigger that auto-increments a table's primary key:


Expand|Select|Wrap|Line Numbers
  1. CREATE OR REPLACE TRIGGER trigger
  2. BEFORE INSERT
  3. ON test
  4. REFERENCING NEW AS NEW
  5. FOR EACH ROW
  6. BEGIN
  7. SELECT event_plan_sequence.nextval INTO :NEW.id FROM dual;
  8. END;
But when I type it into SQL*Plus, it just hangs, as if waiting for a semicolon.

BTW, I'm using SQL*Plus v9.2 and oracle 10g v 10.2
May 29 '08 #1
3 1462
debasisdas
8,127 Expert 4TB
TRIGGER is a keyword.

use a different name for the trigger.
May 30 '08 #2
zensunni
101 100+
Actually, I used trigger as a generic name, just for purposes of listing it here. The real name was something else.

But, I've solved the problem. Apparently, this command needed a slash ("/") at the end.

Thanks anyways for the post.
May 30 '08 #3
debasisdas
8,127 Expert 4TB
That means your code was never compiled and you were thinking the system is hanging.
Jun 2 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

11 posts views Thread by anuradha.k.r | last post: by
5 posts views Thread by Scott | last post: by
5 posts views Thread by Loane Sharp | last post: by
6 posts views Thread by Alexander Widera | last post: by
9 posts views Thread by Phoe6 | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by haryvincent176 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.