开发者

How to copy a Postgresql varchar column to an integer column

开发者 https://www.devze.com 2023-04-05 10:07 出处:网络
I have a pos开发者_如何学编程tgresql table named baseballs with a column named quantity of type = varchar and would like to populate the quantity_integer column with type = integer

I have a pos开发者_如何学编程tgresql table named baseballs with a column named quantity of type = varchar and would like to populate the quantity_integer column with type = integer

How would I write a SQL statement?


update baseballs set quantity_integer = quantity::int;
0

精彩评论

暂无评论...
验证码 换一张
取 消