嗨,大家好,我需要在ORACLE 10g中創建一個觸發器,它確保在birthDate之前的deathDate無法輸入。我真的很苦惱,請你能提供支持,謝謝你仁慈的人。協助創建一個觸發器
我的方案是:
Actor (actorID, lastName, firstName, middleName, suffix, gender, birthDate, deathDate)
Movie (movieID, title, year, company, totalNoms, awardsWon, DVDPrice, discountPrice)
Quote (quoteID, quote)
Role (roleID ,roleName ,gender ,actorID* ,movieID*)
RoleQuote (roleID*, quoteID*)
謝謝
如果有任何更多的信息,你需要請諮詢
我的關係約束是:
CONSTRAINT_NAME C
------------------------------ -
QUOTE_FK R
ROLE_FK R
MOVIE_ROLE_FK R
ACTOR_ROLE_FK R
ACTORID P
MOVIEID P
QUOTEID P
ROLEID P
ROLEQUOTEID P
Relationships:
ALTER TABLE Role ADD CONSTRAINT ACTOR_ROLE_FK FOREIGN KEY (actorID) REFERENCES Actor (actorID);
ALTER TABLE Role ADD CONSTRAINT MOVIE_ROLE_FK FOREIGN KEY (movieID) REFERENCES Movie (movieID);
ALTER TABLE RoleQuote ADD CONSTRAINT Role_FK FOREIGN KEY (roleID) REFERENCES Role (roleID);
ALTER TABLE RoleQuote ADD CONSTRAINT Quote_FK FOREIGN KEY (quoteID) REFERENCES Quote (quoteID);
你嘗試過這麼遠嗎? [P.S ...](http://www.techonthenet.com/oracle/triggers/index.php) – Ben 2012-02-29 23:56:23
我將發佈: CREATE TRIGGER death_date_not_valid BEFORE birthDate
user1137472
2012-02-29 23:59:18
我不知道這是正確的,但它是我試過的 – user1137472 2012-02-29 23:59:51