0

Is it possible to select values in all caps and update those values to capitalize with the same query?

I am able to select them like this:

SELECT *
FROM t1
WHERE name REGEXP BINARY '^[A-Z]+$';
R. García
  • 777
  • 8
  • 19
santa
  • 11,716
  • 43
  • 149
  • 239

1 Answers1

0
update t1
set name = ...
where name = regexp binary '^[A-Z]+$';

Where that ... is any number of solutions from this answer.

Do this in a transaction in case there's a mistake.

Schwern
  • 139,746
  • 23
  • 170
  • 313