Created
June 24, 2016 09:30
-
-
Save oliviermarin/bc3d9f7c0b5afd5e04744b561677ef63 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DECLARE | |
region_id integer; | |
BEGIN | |
-- Insertion de la région de la réunion | |
INSERT INTO t1(t1_f1, t1_f2, t1_f3, t1_f4) | |
VALUES ('Réunion', '04', TRUE, 1) RETURNING id INTO t1_id; | |
-- Insertion du département région | |
INSERT INTO t2(t2_f1, t2_f2, t2_f3, t1fk_t1) | |
VALUES ('Réunion', '974', TRUE, t1_id); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment