木子屋 Dnawo's BLOG

SQL Server添加/删除/修改列示例

👤 dnawo 📅 2012-08-10 👁 3638 👍 0 💬 0 🔄 本站原创
表结构:
create table UserTB
(
	Id int identity primary key,
	Name nvarchar(50) not null
)

1).添加列
alter table UserTB add Age int

2).删除列
alter table UserTB drop column Age

3).修改列
alter table UserTB alter column Name nvarchar(20) not null

评论(0)

暂无评论。

计算题
评论需审核通过后显示
← 上一篇 ASP.NET MVC3 Web应用程序中启用GZip压缩示例 下一篇 → ASP.NET MVC3 + Entity Framework表…