一个SQL语句问题,大家帮忙看看
select * from test where 月='" & "2" &"' and 日>='" & "2" &"' and 日<='" & "12" &"'"
我想查询月份等于2,日在2和12之间的记录,但查询结果为空(肯定有符合的数据)
我还发现,如果写成
select * from test where 月='" & "2" &"' and 日>='" & "2" &"' and 日<='" & "9" &"'"
或者
select * from test where 月='" & "2" &"' and 日>='" & "10" &"' and 日<='" & "34" &"'"
都可以查到相符合的数据
难道必须是两个同位数(上下限都是个位数(2,9)或十位数(10,34))才能查讯道结果吗?