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
为什么我用 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 查询出没有数据啊。。
以下写法可以吧: select * from 表名 where convert(char(10),日期字段,111) > '2007/11/01'
为何贴子中自动增加空格呢? 试一下 select * from tablename
select * from table where 时间列!> '2007-11-02 ' 这个就可以了前提是你的数据库设计这列式datetime格式 如果不是 select * from titles where cast(时间列 as datetime)> '2007-11-02 '
select * from 表 where convert(varchar(10),日期,120)>'20007-11-1'
select * from table where cast(table_time as datetime) > ´2007-11-1
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
查询出没有数据啊。。
select * from 表名 where convert(char(10),日期字段,111) > '2007/11/01'
试一下
select * from tablename
这个就可以了前提是你的数据库设计这列式datetime格式
如果不是
select * from titles where cast(时间列 as datetime)> '2007-11-02 '