时间:2021-06-08 07:47:57 | 栏目:PostgreSQL | 点击:次
我就废话不多说了,大家还是直接看代码吧~
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函数 填充数据(插入数据)
select x, y, generate_series(-1,1) as x_g, value from test_mov_avg