Just wondering which is faster:
DELETE FROM table_name WHERE X='1'
DELETE FROM table_name WHERE X='2'
DELETE FROM table_name WHERE X='3'
or
DELETE FROM table_name WHERE X IN ('1', '2', '3')
Any ideas, hints, or references where to read?
Thank you all!
If you wanted to delete a number of rows within a range, you can use the AND operator with the BETWEEN operator. DELETE FROM table_name WHERE column_name BETWEEN value 1 AND value 2; Another way to delete multiple rows is to use the IN operator.
The DELETE statement is used to delete existing records in a table.
The single delete will be faster for a few reasons:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With