Create oracle trigger that will update a new column with the concatenated values of the updated columns
I have firstName, lastName and fullName columns in oracle. I want to be able to create a trigger that updates the fullName column with the firstName and lastName values when they are either updated or inser开发者_如何学Cted. I would think this would be possible to do in oracle. Does anyone have any ideas. Thanks very much.
create or replace trigger pick_a_name
before insert or update
on mytable
for each row
begin
:new.full_name := :new.firstName ||' '|| :new.lastName;
end pick_a_name;
精彩评论