MySQL Forums
Forum List  »  Stored Procedures

VALUES deprecation on INSERT since 8.0.19
Posted by: Stephan Woods
Date: July 14, 2020 06:08AM

Hello everyone,

since MySQL 8.0.19 in a procedure there is a warning in INSERT INTO ON DUPLICATE UPDATE

(We are using version 8.0.20)

Here an example:

INSERT INTO articles
FROM articles_pre a
INNER JOIN cards_pre c ON = c.artIdRef
c.collectionIdRef = collId # var given to procedure
AND c.contentType = 'article'
title = VALUES ( title );

articles_pre and articles have the same structure and the same spelling.
The order of the subquery does not matter, the id will be the same in both tables.

Is there a way to keep INSERT SELECT ON DUPLICATE UPDATE without VALUE and use the row alias "new"?

I have tested serveral stmts, but nothing works without VALUES for me. My only option left is to split things up into SELECT and INSERT or UPDATE.
Has someone an idea, how to still work with INSERT SELECT ON DUPLICATE for this constellation?

Thank you

Options: ReplyQuote

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.