select (convert(varchar(10),db_date,120)) as t1 from tb_1 where  t1='2006-11-05'
怎么执行时有错?

解决方案 »

  1.   

    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'
      

  2.   

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

  3.   

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

  4.   

    为了效率……select convert(varchar(10),db_date,120) as t1 
    from tb_1 
    where db_date='2006-11-05'