PostgreSQL 查询某月有多少天

 

SELECT generate_series(1, EXTRACT(day FROM ('2021-02-1 15:36:13.340'::timestamp + interval '1 month - 1 day'))::integer) AS number;

 

posted @ 2023-08-09 15:17  三瑞  阅读(46)  评论(0编辑  收藏  举报