MySQL Forums
Forum List  »  InnoDB

Re: How to update two tables but limit one row?
Posted by: Peter Brawley
Date: February 09, 2019 08:28PM

Order By and Limit aren't supported in multi-table updates.

To update a specific t2 row only you'll need to specify it uniquely, eg with its primary key.

update t1
join t2 on t1.id = t2.parentId
set ...
where ...

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: How to update two tables but limit one row?
45
February 09, 2019 08:28PM


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.