This is a settable option in mysql: https://dev.mysql.com/doc/refman/8.0/en/server-system-variab...
UPDATE users SET email = lower(email) LIMIT COUNT(email)
if you want. I kind of like that, because it requires you to be more explicit than just putting 'WHERE 1=1'. It seems like mistakes would be fewer, too, because putting LIMIT COUNT(email) isn't just some default boilerplate you can get used to typing.> Not everyone realizes this, but the COUNT function will only count the records where the expression is NOT NULL in COUNT(expression) . When the expression is a NULL value, it is not included in the COUNT calculations.