Locate upper case characters in SQL Server database field

前端 未结 4 484
猫巷女王i
猫巷女王i 2021-01-18 12:06

I need to locate rows in a database table that have a field with an upper case value.

E.g.: select * from Cust where Surname like \'COnTAiNS UpPERcASE VaLUe         


        
4条回答
  •  旧巷少年郎
    2021-01-18 12:51

    Another way

    SELECT *
    FROM Cust
    WHERE Surname NOT LIKE '%[^A-Z]%' COLLATE Latin1_General_BIN
    

提交回复
热议问题