How can we check In PostgreSQL or SQL:
A string saved in database to lowercase OR uppercase?
For example, I have five records in my database table and I want to fetch only those records that have lowercase characters.
Here is my content table and id's in primary key
id Content
1 TEST
2 Test
3 TEst
4 TESt
5 TEST01
I need to fetch id 2,3,4 respectively which contains context value in lowercase.
Add the following WHERE
clause:
WHERE content <> upper(content)
That will only retrieve the rows that contain lower case characters.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments