Tutorial 50 - Triggers in PostgreSQL

preview_player
Показать описание
Learn about Triggers in PostgreSQL
Рекомендации по теме
Комментарии
Автор

Keep it up! Looking forward for more videos from you, don't stop!

Tracks
Автор

Thank you so much,
Keep posting more videos

navin_kumar_ramalingam
Автор

can you please make a video about time triggers for example i want to execute the function once a year or once a month is it possible?

pewpewpew
Автор

could you put subtitles in it ? please

a.gm.
Автор

you could prepare more visual info, first 5min is like just audio in black background

Cupcakes
Автор

Thank you very much, this video is very simple and useful.

FarsYounis
Автор

Significance of return new in the function

vishwaskhare
Автор

Bro what if I have 12 columns and all columns are editable what is the syntax.

Because on your example it is only the address. Should I create another trigger for each item that can be edited like for example location, phone mumber etc

Can you help bro?

patrickknows
Автор

-- create trigger function
create or replace function log_change()
returns trigger as
$BODY$
begin
if NEW.address<>OLD.address then
insert into emp_logs values(old.id, old.address, new.address, old.name);
end if;
return new;
end;
$BODY$
language plpgsql;

-- create trigger
create trigger loc_changer
before update
on company
for each row
execute procedure log_change();

kunyuchang