时间:2021-07-01 10:21:17 帮助过:18人阅读
添加列:alter table table_name add new_column data_type [interality_codition]
ALTER TABLE dbo.tb newColumn INT
删除列:alter table table_name drop column column_name
ALTER TABLE dbo.tb DROP COLUMN [column]
修改列名:sp_rename ‘tablename.colname‘,newcolname,‘column‘
sp_rename ‘tb.column‘,‘newcolumn‘, ‘column‘
修改列名的类型:alter table table_name alter column column_name
ALTER TABLE dbo.tb ALTER COLUMN [column] NVARCHAR(200)
sql 增删改列名
标签:char add new rename data blog var odi 增删改 tab