How to use alphanumeric fields with BETWEEN clause in Mysql?
问题 I have a table that contain a field names as mgrs, the value that stored in mgrs fields is like '42SWC227821555' may contain more charachters, and may contain lower case letters. So now i want to search records between two mgrs, so how can i do that? can i convert mgrs value to integer first and then use in between clause? 回答1: Instead of BETWEEN clause use STRCMP(expr1, expr2) function for string comparison operations: WHERE STRCMP(mgrs, '42SWC227821555') >= 0 AND STRCMP(mgrs,