有一个查询语句,这样写:select Money from zcxIncome where Time1>2009-8-11是正确的,但是我想把时间的时、分、秒也带进去,这样查询:select Money from zcxIncome where Time1>2009-8-11 16:39:41查询时,系统提示:
服务器: 消息 170,级别 15,状态 1,行 1
第 1 行: '16' 附近有语法错误。
意思是时间的“时分秒”表述有问题,正确的应该怎么写?在线等!

解决方案 »

  1.   

    datetime类型的数据,用单引号括起来.
      

  2.   

    select Money from zcxIncome where Time1>'2009-8-11 16:39:41'
      

  3.   


    select Money from zcxIncome where Time1>'2009-8-11 16:39:41'
      

  4.   

    select Money from zcxIncome where Time1>'2009-8-11 16:39:41'
      

  5.   


    select Money from zcxIncome where Time1>'2009-8-11 16:39:41'
      

  6.   

    select Money from zcxIncome where Time1>'2009-8-11 16:39:41' 
      

  7.   

    select Money from zcxIncome where Time1>'2009-8-11 16:39:41'
    呵呵,''都不加是什么类型呀
      

  8.   

    select [Money] from zcxIncome where Time1>'2009-8-11 16:39:41'