sqlServer 2008 修改字段类型和重命名字段名称的sql语句

//修改字段的类型
alter table fdi_news alter column c_author nvarchar(50)
//重命名字段的名称
EXEC sp_rename 'FDI_PROJECT.[c_foreignCountryPer]','c_foreignCompanyPer','COLUMN';
//增加字段
alter table fdi_news add c_author nvarchar(50)
//删除字段
alter table fdi_news drop c_author nvarchar(50)

猜你喜欢

转载自ch-dj.iteye.com/blog/1462448