【发布时间】:2017-01-24 22:36:36
【问题描述】:
使用 postgis 扩展运行 postgres:尝试在 select into table 语句期间更改列的数据类型
munsummary 表中的 sum_popint 列是 double 列,我想在 select 语句期间将其更改为整数列。我知道我可以使用 update/alter 语句在 select into 语句之前或之后将列数据类型更改为整数,但我想在 select 语句中执行此操作。
SELECT county,
SUM(sum_popint) AS residentialpopulation,
st_union(geom)
INTO countysummary
FROM munsummary
GROUP BY county;
【问题讨论】:
标签: sql postgresql postgis type-conversion