One - One Code All

Blog Content

PostgreSql日期类型的模糊查询to_char

PostgreSQL   2019-05-16 07:52:17

日期类型的模糊查询是不能直接进行的,要先转换成字符串然后再查询

select * from table where to_char(feildname, 'yyyy-mm-dd hh24:mi:ss') like '%08:30:00%'

 




上一篇:PostgreSQL数据库备份pg_dump导入压缩文件
下一篇:docker安装并持久化postgresql数据库

The minute you think of giving up, think of the reason why you held on so long.