1.更改表名
alter table 表名 rename to 新表名
2.更改字段名
alter table 表名 rename 字段名 to 新字段名
3,更改字段类型
如:ID 字段 原类型为 character varying(50) 新类型为integer
其中,ID中原有数据为1,2,3等数字
用如下语句更改
alter table dbo.titemtype alter column id type integer using to_number(id,'9');
最后
以上就是朴素芒果最近收集整理的关于postgresql 字段sql语句 更改表名的全部内容,更多相关postgresql内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复