CREATE OR REPLACE TRIGGER OBU
BEFORE INSERT ON BOOKING
REFERENCING NEW AS n
FOR EACH ROW
BEGIN
INSERT INTO BOOKINGLOG VALUES(n.HOTELID,n.ROOMNO,n.GUESTID,n.STARTDATE,n.ENDDATE,'SYSTEM',SYSDATE);
ENG;
.
/
當我嘗試執行它即時收到此錯誤:Oracle之前INSERT觸發器
LINE/COL ERROR
-------- -----------------------------------------------------------------
3/4 PLS-00103: Encountered the symbol "end-of-file" when expecting
one of the following:
(begin case declare end exception exit for goto if loop mod
null pragma raise return select update while with
<an identifier> <a double-quoted delimited-identifier>
<a bind variable> << continue close current delete fetch lock
insert open rollback savepoint set sql execute commit forall
merge pipe purge
@DCookie - 謝謝你 – LittleBobbyTables 2013-02-22 01:19:59