Running postgres with postgis extension: trying to change datatype of column during a select into table statement
The column sum_popint in the munsummary table is double and I want to change it into an integer column during the select statement. I am aware I can alter the column datatype to integer before or after the select into statement using the update/alter statements but i want to do it within the select statement.
SELECT county,
SUM(sum_popint) AS residentialpopulation,
st_union(geom)
INTO countysummary
FROM munsummary
GROUP BY county;