トリガーをテーブルにアタッチした後、テーブルに値を挿入する際に問題が発生しました。トリガーは次のとおりです。
CREATE TRIGGER trig
AFTER INSERT ON Follows
REFERENCING NEW as N
FOR EACH row
WHEN ((Select email from Celebrity) <> N.followed_email)
UPDATE followSuggestion SET followSuggestion.Suggested_follower = N.followed_email, followSuggestion.Suggested_followee = N.follower_email
;
挿入コードは次のとおりです。
INSERT INTO follows
VALUES('Michael_Phelps@uss.net','Michael_Phelps@uss.net');
そして、エラーは次のとおりです
DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0811N The result of a scalar fullselect, SELECT INTO statement, or VALUES
INTO statement is more than one row. SQLSTATE=21000
SQL0811N The result of a scalar fullselect, SELECT INTO statement, or VALUES INTO statement is more than one row.
よろしくお願いします!