SQL语句根据具体时间查询数据
时间格式为:年/月/日 时:分:秒
例如:2017/2/28 16:23:23
sql语句为:selecte * from A where createtime=to_date('2017/2/28 16:23:23' ,'yyyy/mm/dd hh24:mi:ss');
本文介绍了一种使用SQL语句按精确时间查询数据的方法。通过示例展示了如何将特定的时间格式转换为数据库可识别的日期时间格式,从而实现精确到秒的数据检索。
SQL语句根据具体时间查询数据
时间格式为:年/月/日 时:分:秒
例如:2017/2/28 16:23:23
sql语句为:selecte * from A where createtime=to_date('2017/2/28 16:23:23' ,'yyyy/mm/dd hh24:mi:ss');
2790