原文链接:http://blog.csdn.net/xiyuan1999/article/details/6697372
SQL语句增加列、修改列、删除列
1.增加列:
[java]
view plain
copy
- alter table tableName add columnName varchar(30)
2.1. 修改列类型:
[java]
view plain
copy
- alter table tableName alter column columnName varchar(4000)
2.2. 修改列的名称:
[java]
view plain
copy
- EXEC sp_rename ‘tableName.column1’ , ‘column2’ (把表名为tableName的column1列名修改为column2)
3.删除列:
[java]
view plain
copy
- alter table tableName drop column columnName