格式
查询的结果,要求某列大于某个时间点的记录。
-- tablename 表名
-- columnname 列名
select * from tablename where columnname > to_date('2020:7:31 09:40:00','yyyy-mm-dd hh24:mi:ss');
例子
select * from tablename
where to_date(modifytime ,'yyyy-mm-dd hh24:mi:ss') > to_date('2020-07-29 00:00:00','yyyy-mm-dd hh24:mi:ss')
and to_date(createtime,'yyyy-mm-dd hh24:mi:ss')>to_date('2020-07-29 00:00:00','yyyy-mm-dd hh24:mi:ss');
modifytime 和 create 都是字符串,需要转成时间,时间和时间比较;不然会提示文字和字符不匹配。