开发者

Update the record which is being inserted/updated using a trigger

How can I update a full name as the c开发者_StackOverflow中文版ombination of the first name and last name of the same record which is being updated/inserted using a trigger?


CREATE OR REPLACE TRIGGER updateFullName
BEFORE INSERT OR UPDATE ON table
FOR EACH ROW
BEGIN
  :NEW.full_name := :NEW.first_name || ' ' || :NEW.last_name;
END;
/

Though a view would probably be more appropriate in this case

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜