Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE OR REPLACE FUNCTION migration ()
- RETURNS void
- AS'
- declare
- total secretario%RowType;
- BEGIN
- FOR total IN SELECT * FROM secretario
- loop
- insert into secretario_escola values(total.id, total.escola_id);
- end loop;
- END'
- LANGUAGE plpgsql;
- SELECT migration();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement