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
  • 815
  • 9
  • 20
santa
  • 12,234
  • 49
  • 155
  • 255

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
  • 153,029
  • 25
  • 195
  • 336