How to select only uppercase or lowercase records from mysql table
The table A contains following two records ‘111a’ and ‘111A’, if you want to select only ‘111A’ record using following those queries it will outputs both the records instead outputting single records.
SELECT * FROM table_A WHERE value = '111A' SELECT * FROM table_A WHERE value LIKE '%A'
Here is the solution to select only uppercase or lowercase letter records from your table. In the below sql query the BINARY operator casts the string following it to a binary string. This is an easy way to force a comparison to be done byte by byte rather than character by character in where condition.
SELECT * FROM table_A WHERE binary value = '111A'
SELECT * FROM table_A WHERE binary value = '111a'
Download Premium Only Scripts & 80+ Demo scripts Instantly at just 1.95 USD per month + 10% discount to all Exclusive Scripts
If you want any of my script need to be customized according to your business requirement,
Please feel free to contact me [at] muni2explore[at]gmail.com
Note: But it will be charged based on your customization requirement