VALUES deprecation on INSERT since 8.0.19
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
(SELECT
a.id,
a.app,
a.title
FROM articles_pre a
INNER JOIN cards_pre c ON a.id = c.artIdRef
WHERE
c.collectionIdRef = collId # var given to procedure
AND c.contentType = 'article'
)
ON DUPLICATE KEY UPDATE
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
Subject
Views
Written By
Posted
VALUES deprecation on INSERT since 8.0.19
1287
July 14, 2020 06:08AM
549
July 14, 2020 09:50AM
483
July 14, 2020 01:11PM
505
July 14, 2020 01:51PM
478
July 15, 2020 01:05AM
487
July 15, 2020 10:19AM
577
July 16, 2020 05:13AM
565
July 16, 2020 11:04AM
541
July 16, 2020 10:49PM
511
July 17, 2020 10:41AM
466
July 17, 2020 11:37AM
516
July 17, 2020 12:20PM
499
July 21, 2020 06:04AM
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.