[DiscordArchive] Why are you not using `REPLACE` instead of `DELETE` and `INSERT` ?
[DiscordArchive] Why are you not using `REPLACE` instead of `DELETE` and `INSERT` ?
![[Image: unknown.png?ex=690c29b6&is=690ad836&hm=0...a6a5fc56e&]](https://cdn.discordapp.com/attachments/369084351129845760/950435956408860672/unknown.png?ex=690c29b6&is=690ad836&hm=02c1a571412b609caefbf82da9f61d2faf06f121a346b10cd8e5a32a6a5fc56e&)
Archived author: Bogir • Posted: 2022-03-07T16:53:10.600000+00:00
Original source
Why are you not using `REPLACE` instead of `DELETE` and `INSERT` ?
It can be simplified, if I'm not mistaken?
![[Image: unknown.png?ex=690c29b6&is=690ad836&hm=0...a6a5fc56e&]](https://cdn.discordapp.com/attachments/369084351129845760/950435956408860672/unknown.png?ex=690c29b6&is=690ad836&hm=02c1a571412b609caefbf82da9f61d2faf06f121a346b10cd8e5a32a6a5fc56e&)
Archived author: Honey • Posted: 2022-03-07T17:08:28.132000+00:00
Original source
If i remember correctly, DELETE and INSERT are separated to be able to delete more or less and also different things than what is to be inserted.
REPLACE INTO is mostly used at runtime, while one can't guarantee that one async query is executed before another.