MySQL Forums
Forum List  »  Newbie

Re: Update same table max based on condition
Posted by: Gideon Engelbrecht
Date: May 05, 2021 09:44AM

For those interested I used the following :

UPDATE blokkeklaar AS r
JOIN
( SELECT blokkeklaarkultivar,MAX(BlokkeklaarPersentGelewerKultAliasnaam) AS maks
FROM blokkeklaar
GROUP BY blokkeklaarkultivar ) AS grp
ON
grp.blokkeklaarkultivar = r.blokkeklaarkultivar
SET r.BlokkeklaarmaksimumKultAliasnaam = grp.maks

Options: ReplyQuote


Subject
Written By
Posted
Re: Update same table max based on condition
May 05, 2021 09:44AM


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.