假设要查询20007-11-1之后有数据sql语句要怎么写

解决方案 »

  1.   

    select * from table where 时间列!>'2007-11-02'select * from table where convert(varchar(10),时间列,120)>'2007-11-01'
      

  2.   

    select * from adjust where DATEDIFF (day ,'2007-08-01' , createdate)>0 
      

  3.   

    为什么我用
    select   *   from   table   where   时间列!> '2007-11-02 ' select   *   from   table   where   convert(varchar(10),时间列,120)> '2007-11-01 '
    ////////////////查询出来是所有数据

    select * from adjust where DATEDIFF (day ,'2007-08-01' , createdate)>0 
    查询出没有数据啊。。
      

  4.   

    以下写法可以吧:
    select * from 表名 where convert(char(10),日期字段,111) > '2007/11/01'
      

  5.   

    为何贴子中自动增加空格呢?
    试一下
    select * from tablename
      

  6.   

    select   *   from   table   where   时间列!> '2007-11-02 '
    这个就可以了前提是你的数据库设计这列式datetime格式
    如果不是
    select * from titles where cast(时间列 as datetime)> '2007-11-02 '
      

  7.   

    select * from 表 where convert(varchar(10),日期,120)>'20007-11-1'
      

  8.   

      select * from table where cast(table_time as datetime) > ´2007-11-1