I'm currently developing a REST API that connects to a MySQL database and does a bunch of queries.
In one of those queries I happen to have to delete a bunch of rows from a table and each of those rows have a unique identifier.
And basically I have two approaches to do so: (that I know).
- Build a bunch of
DELETE FROM table WHERE id=value;statements and execute them sequentially.
- Build only a
DELETE FROMstatement but with a massive
I don't have a ton of experience handling databases and any suggestion or advice would be greatly appreciated.
I just noticed that I also have something similar happening with a
UPDATE FROM statement where I set a lot of records to the same given value, so any advice on that too would be really nice.