telwanggs

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/sq8706/article/details/7077148
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\');


————————————————
版权声明:本文为CSDN博主「sq8706」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/sq8706/article/details/7077148

分类:

技术点:

相关文章:

  • 2021-07-23
  • 2021-06-12
  • 2021-11-17
  • 2022-01-23
  • 2022-12-23
  • 2021-11-17
  • 2022-02-07
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-07-24
  • 2022-12-23
  • 2021-11-28
  • 2022-12-23
  • 2021-09-10
相关资源
相似解决方案