[英]How can I select values with 0 as prefix e.g. 00-09
My column called 'abstract' varchar(2)
utf8_general_ci
has the following mixed values: 我的名为'abstract'varchar varchar(2)
utf8_general_ci
具有以下混合值:
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ... 98, 99,
00, 01, 02, 03, 04, 05, 06, 07, 08, 09,
A, B, C, D, E, F, G, ... X, Y, Z
How can I exclude the values 0-99
and AZ
in an select query without explicit nomination. 如果没有明确的提名,如何在选择查询中排除值0-99
和AZ
。 I do only need the values 00-09
. 我只需要值00-09
。 I tried the following query: 我尝试了以下查询:
select * from table where abstract REGEXP '[^0-99]' and abstract REGEXP '[^AZ]';
But the REGEXP '[^0-99]'
removes also the 00-09
from result. 但是REGEXP '[^0-99]'
也从结果中删除了00-09
。
这应该做:
select * from table where abstract like "0%" and abstract != "0";
尝试这个:
select * from table where abstract like %'00-0'%;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.