更改表的sql语句
ALTER table employees ALTER COLUMN status TYPE boolean USING status::boolean;
报下列错误
因为字段上设置了默认值班,所以更改不了,就当先删除默认值再改
删除默认值sql语句
ALTER TABLE employees ALTER COLUMN status DROP DEFAULT;
参考资料:
https://blog.csdn.net/qq3892997/article/details/102619704