版权声明:版权声明:本文为博主原创文章,转载请注明出处。 https://blog.csdn.net/lililuni/article/details/83991879
表主键id为char类型,time为Date类型,正确的查询语句为:
select from 表名 where id='char值 ' and time =
to_date('2015-01-01 00:00:00' , 'yyyy-mm-dd hh24:mi:ss')
注意:char值为单引号,时间的to_date函数的第2个参数为时间格式,可变动。