Bas Bas - 2 months ago 19
MySQL Question

Select all records after the CHAR c

I have a column(char) with values between A and Z
I only want to select the records where the char is >= 'C'

Can anyone help me with this?
I tried >= 'C' but this didn't work. Also I couldn't find anything about this on the internet. So I thought it's a good question to ask.

vkp vkp
Answer

You can use the ascii value for comparison.

select * from tablename where ascii(colname) >= ascii('C')
Comments