Created
January 17, 2013 22:31
-
-
Save tqheel/4560463 to your computer and use it in GitHub Desktop.
Oracle PL/SQL for doing multiple Inserts with a UNION ALL statement, when a sequencer sets the primary key value.
This file contains hidden or 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
insert into app_item(app_item_id, control_id, app_page_id, description, default_label) | |
select SEQ_APP_ITEM.nextval, a, b, c, d from | |
( | |
select'LabelNameSuffix' as a, 183 as b, 'Name Suffix' as c, 'Name Suffix' as d from dual | |
union all | |
select 'LabelFax', 184, 'Fax Number', 'Fax Number' from dual | |
) | |
; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment