본문으로 건너뛰기
0

이 레슨은 당분간 영어로 제공돼요.

Insert or update, in one go

A player finishes a round of drive. If it's their first drive score, insert a row; if they already have one, keep the higher score. Doing that with a SELECT followed by an INSERT or an UPDATE breaks when two requests arrive at the same moment. MySQL does it in one statement.