【发布时间】:2020-06-08 20:24:34
【问题描述】:
我在 postgresql 中有一个包含两列的简单表 “Profile_id”(文本) policy_expires(日期)
policy_expires 列是空的(只有空值)。 我想用 s 系列日期更新该列。 我试过这个查询
insert into public.renewal_large ("policy_expires")
select generate_series('2020-07-01'::date,'2021-08-01'::date,'1 hour'::interval
它确实创建了我需要的一系列日期,但它还在每个新日期旁边创建了一个空的配置文件 ID 值。
我正在尝试找出正确的查询来使用日期系列更新现有的 profie_id 列
【问题讨论】:
标签: sql postgresql date select sql-update