I have a statement that looks like this:
Insert into table (value1, value2, value3)
Values (%s, %s, %s)
Could I do something where it will attempt to insert, but on conflict update value2 and value3 where value1 = value1 (i.e., value1 equals the duplicate primary key that is trying to be inserted against)?
2条答案
按热度按时间4smxwvx51#
For one insert (assuming value1 is a key)
For multiple inserts
hyrbngr72#