oracle 查询大于某时间点的数据
格式select * from tablename where column > to_date(‘2020:7:31 09:40:00’,‘yyyy-mm-dd hh24:mi:ss’);例子ts和create都是字符串,需要转成时间,时间和时间比较;不然会提示文字和字符不匹配。select * from bd_cumandoc where to_date(ts,‘yyyy-mm-dd h
·
格式
查询的结果,要求某列大于某个时间点的记录。
-- 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 都是字符串,需要转成时间,时间和时间比较;不然会提示文字和字符不匹配。

DAMO开发者矩阵,由阿里巴巴达摩院和中国互联网协会联合发起,致力于探讨最前沿的技术趋势与应用成果,搭建高质量的交流与分享平台,推动技术创新与产业应用链接,围绕“人工智能与新型计算”构建开放共享的开发者生态。
更多推荐
所有评论(0)