select (convert(varchar(10),db_date,120)) as t1 from tb_1 where t1='2006-11-05' ----------------------------------------------------------------- tb_1表中无此字段t1 select (convert(varchar(10),db_date,120)) as t1 from tb_1 where convert(varchar(10),db_date,120) ='2006-11-05'
为了效率,请按冒牌的写法select (convert(varchar(10),db_date,120)) as t1 from tb_1 where t1>='2006-11-05' and t1<'2006-11-06'
冒牌写错了为了效率,请按冒牌的写法select (convert(varchar(10),db_date,120)) as t1 from tb_1 where db_date>='2006-11-05' and db_date<'2006-11-06'
为了效率……select convert(varchar(10),db_date,120) as t1 from tb_1 where db_date='2006-11-05'
-----------------------------------------------------------------
tb_1表中无此字段t1
select (convert(varchar(10),db_date,120)) as t1
from tb_1
where convert(varchar(10),db_date,120) ='2006-11-05'
where t1>='2006-11-05' and t1<'2006-11-06'
where db_date>='2006-11-05' and db_date<'2006-11-06'
from tb_1
where db_date='2006-11-05'