字段修改

来源:互联网 发布:dhtmlhistory.js下载 编辑:程序博客网 时间:2024/03/29 13:12

字段类型修改

错误提醒:

alter table strategy_place alter COLUMN img type json;ERROR:  column "img" cannot be cast automatically to type jsonHINT:  You might need to specify "USING img::json".

正确写法:

alter table strategy_place alter COLUMN img type json using img::json;

表名修改

alter table 表名 rename to 新表名

字段名字修改

alter table 表名 rename 字段名 to 新字段名
0 0
原创粉丝点击