对> =和< =的Mysql查询未显示正确的结果

时间:2013-10-26 06:33:16

标签: mysql

我有一个包含名为'extension'的列及其varchar类型的表。现在查询> =和< =没有显示准​​确的结果。我只显示最后的< =数字结果..

这是我的查询。

SELECT *,date(calldate) as date,time(calldate) as time FROM data_table
where date(calldate) between '2010-10-01' and '2013-10-01'
and cast(extension as signed) >=00 And cast(extension as signed) >=11111
ORDER BY id asc LIMIT 0 , 50

在执行给定的查询结果时,仅针对'11111'的扩展而不是00和11111。

任何帮助将不胜感激.. 提前谢谢..

1 个答案:

答案 0 :(得分:0)

cast(extension as signed) <=11111