I need to insert new rows into an oracle(12c) SQL table only if they don't exists using java code It is possible that there will be more then 100 rows to check and insert
ideally I would like to have one merge statement with multiple inserts something like this:
MERGE INTO some_table t
USING(???)
ON(???)
WHEN MATCHED THEN UPDATE ???
WHEN NOT MATCHED THEN INSERT (t.id, t.val)
value("some_id","some_data")
...
...
...
but I have trouble with syntax and i can't find any examples for this case ether
I would like to know:
thanks for help
遵循OldProgrammer的建议,我将创建临时表,在其中插入新数据,并且将在两个表之间合并
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.