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');
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');