SELECT generate_series(1,12) AS month;
SELECT generate_series(1,12,1) AS month;
SELECT generate_series(‘2020-01-01’::DATE,‘2020-12-31’::DATE,‘1 month’::INTERVAL) AS first_of_month;
PostgreSQL的generate_series()函数使用技巧
最新推荐文章于 2024-09-03 01:36:20 发布
SELECT generate_series(1,12) AS month;
SELECT generate_series(1,12,1) AS month;
SELECT generate_series(‘2020-01-01’::DATE,‘2020-12-31’::DATE,‘1 month’::INTERVAL) AS first_of_month;