MySQL Forums
Forum List  »  Stored Procedures

Re: If exist Update else insert query
Posted by: Peter Brawley
Date: December 07, 2020 10:52AM

Right, we can't just make up syntax, specifically we can Insert a Select but we can't Select an Update or Insert.

There is sytx for what you're trying to do, which is update something if it's there else insert it. Read about Inseert ... On Duplicate Key Update ... on the Insert page of the manual.

Options: ReplyQuote


Subject
Views
Written By
Posted
224
December 07, 2020 01:33AM
Re: If exist Update else insert query
72
December 07, 2020 10:52AM


Sorry, only registered users may post in this forum.

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.