You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/01/17 09:43:04 UTC

[GitHub] [incubator-shardingsphere] joewee removed a comment on issue #3856: Parse `ON DUPLICATE KEY UPDATE xxx= VALUES(xxx)` error

joewee removed a comment on issue #3856: Parse `ON DUPLICATE KEY UPDATE xxx= VALUES(xxx)` error
URL: https://github.com/apache/incubator-shardingsphere/issues/3856#issuecomment-575551596
 
 
   > @joewee Could you please provide small SQL to me for validation?
   @SteNicholas Yes, of course! Please try the following small SQL
   insert into product_sharding (product_code,brand_code,`name`,update_time,archived,version) values (?,?, ?,?, ?, 0) on duplicate key update brand_code = if(@update_condition :=(update_time < values(update_time)),values(brand_code),brand_code),name = if(@update_condition ,values(name),name),archived = if(@update_condition,values(archived),archived),version = if(@update_condition,version +1,version),update_time = if(@update_condition,values(update_time),update_time)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services