你表里的数据类型是不是定义成字符型了? 用select * from table_1 where supply_time='2006-01-01 00:00:00.000' 试看看
select * from table_1 where supply_time='2006-01-01 00:00:00.000'; 不行的话就 select * from table_1 where supply_time=cast('2006-01-01 00:00:00.000' as datetime) 再不行就将就一点 select * from table_1 where convert(varchar(10),supply_time,120)='2006-01-01'
select * from table_1 where supply_time>='2006-01-01' and supply_time<'2006-01-02'--查询2006-01-01这一天的数据
用select *
from table_1
where supply_time='2006-01-01 00:00:00.000'
试看看
from table_1
where supply_time='2006-01-01 00:00:00.000';
不行的话就
select * from table_1 where supply_time=cast('2006-01-01 00:00:00.000' as datetime)
再不行就将就一点
select * from table_1 where convert(varchar(10),supply_time,120)='2006-01-01'
from table_1
where supply_time>='2006-01-01' and supply_time<'2006-01-02'--查询2006-01-01这一天的数据