我为视频俱乐部(HomeWork)写了这个
CREATE TABLE FILMS (
TITLE VARCHAR (35),
GENDER VARCHAR (15),
MANAGERVARCHAR (20),
ACTORS VARCHAR (90),
COPYS INT)
CREATE TABLE LOAN (
ID_LOAN INT,
ID_PARTNER INT,
FILM_LOAN VARCHAR (35),
DATE_LOAN DATE,
ID_COPY INT
)
CREATE OR REPLACE TRIGGER LESS_COPY
AFTER INSERT ON LOAN
FOR EACH ROW
BEGIN
UPDATE FILM SET FILMS.COPYS = FILMS.COPYS - 1
WHERE FILMS.TITLE = LOAN.FILM_LOAN
END
Oracle给我发了这个
Warning: Trigger created with compilation errors.
我需要帮助来解决这个问题:(
答案 0 :(得分:1)
查询USER_ERRORS
视图以查看编译错误。
在这种情况下,我注意到您的触发器主体显示UPDATE FILM ...
,但表名为FILMS
。
答案 1 :(得分:0)
此外,没有&#34 ;;"在更新声明的末尾