We want to modify some columns of text type to integer, while couldn’t find related command.
Hi,
To achieve this we should:
- add a new column of type integer.
UPDATEthe value of the new column across the table with an appropriate cast of the existing text valuesDROPorRENAMEthe old column- optionally
RENAMEthe new column
Please check the ALTER TABLE documentation for details on how to do this and feel free to comment or upvote feature request #13874 if you think it would be important to make this process simpler.
Thank you.