欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

pgsql获取当前年份相同的字段

程序员文章站 2022-06-07 12:14:41
...
select * from documentmanager.document_info where extract(year from createtime)=extract(year from now());

参考文章:postgresql中获取年份方法