Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- create or replace FUNCTION creer_exemplaires_livre() RETURNS TRIGGER AS
- $$
- BEGIN
- INSERT INTO exemplaire (idlivre) VALUES (new.idlivre);
- INSERT INTO exemplaire (idlivre) VALUES (new.idlivre);
- INSERT INTO exemplaire (idlivre) VALUES (new.idlivre);
- RETURN NEW;
- END;
- $$
- LANGUAGE 'plpgsql';
- create TRIGGER trig_after_ins_livre AFTER INSERT ON livre
- FOR EACH ROW
- EXECUTE PROCEDURE creer_exemplaires_livre();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement