If you’ve ever tried to delete two rows that are identical from SSMS, you may come across this little beauty:
To get around this, you have to delete 1 row at a time and use SET ROWCOUNT. So you would do something like
SET ROWCOUNT 1 GO DELETE FROM users_to_optin where email = 'firstname.lastname@example.org'
That would delete one record at a time, even if there were multiple instances of ‘email@example.com’.
After you’re done, make sure you set the rowcount back to 0, which turns the limitation off.
SET ROWCOUNT 0 GO