Forums WoW Modding Support Archives Azerothcore Discord Archives [DiscordArchive] Why are you not using `REPLACE` instead of `DELETE` and `INSERT` ?

[DiscordArchive] Why are you not using `REPLACE` instead of `DELETE` and `INSERT` ?

[DiscordArchive] Why are you not using `REPLACE` instead of `DELETE` and `INSERT` ?

rektbyfaith
Administrator
0
03-07-2022, 04:53 PM
#1
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&]
rektbyfaith
03-07-2022, 04:53 PM #1

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&]

rektbyfaith
Administrator
0
03-07-2022, 05:08 PM
#2
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.
rektbyfaith
03-07-2022, 05:08 PM #2

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.

Recently Browsing
 1 Guest(s)
Recently Browsing
 1 Guest(s)