How to find all upper case strings in a MySQL table?

后端 未结 6 420
执笔经年
执笔经年 2021-02-03 11:15

I initially thought this is trivial. Then thought \'binary\' might do it. I am unsure at this point.

Name
----
John
MARY
Kin
TED

I would like t

6条回答
  •  有刺的猬
    2021-02-03 12:00

    If your collation is case insensitive then you need to use a BINARY comparison:

    SELECT *
    FROM yourtable
    WHERE Name = BINARY UPPER(Name)
    

    See it working online: sqlfiddle

提交回复
热议问题