Re: sequence in a trigger
"Tony Andrews" <[email protected]> Thu, 20 Feb 2003 10:27:42
| Newsgroups | gmane.comp.db.oracle.devel |
|---|---|
| Message-ID | <LYRIS-1796914-881778-2003.02.20-10.12.07--gcdod-oracle#[email protected]> |
> Can anubody help me in writing a trigger which will generate the sequence no > whenever I insert a record into a table. CREATE OR REPLACE TRIGGER trig1 BEFORE INSERT ON t FOR EACH ROW BEGIN SELECT sequence_name.NEXTVAL INTO :NEW.t_id FROM DUAL; END; / --- Change your mail options at http://p2p.wrox.com/manager.asp or to unsubscribe send a blank email to [email protected].