PostgreSQL 修改列报错:cannot be cast automatically to type
发布时间:2020-12-13 17:30:29 所属栏目:百科 来源:网络整理
导读:正常的修改语句:ALTER TABLE table_name ALTER COLUMN column_name TYPE integer; 执行会报错,cannot be cast automatically to type integer 调整执行语句:ALTER TABLE table_name ALTER COLUMN column_name TYPE integer USING(column_name::integer);
正常的修改语句:ALTER TABLE table_name ALTER COLUMN column_name TYPE integer;
执行会报错,cannot be cast automatically to type integer
调整执行语句:ALTER TABLE table_name ALTER COLUMN column_name TYPE integer USING(column_name::integer); 运行正常。(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |