oracle combine constants unparalleled table
in oracle, given rudimentary information table:
create list information (
id varchar2(255),
pivotal varchar2(255),
value varchar2(511));
suppose i wish "insert update" value. i have something like:
merge information controlling twin
(id='someid' key='testkey')
when matched following
transform set value = 'somevalue'
when matched following
insert (id, key, value) values ('someid', 'testkey', 'somevalue');
is there improved proceed this? management seems have following drawbacks:
- every verbatim needs typed twice (or total twice around parameter setting)
- the "using dual" syntax seems hacky
if best way, there any proceed around carrying set any parameter twice jdbc?
Comments
Post a Comment