SQL Server 2008R2向表中添加字段

    格式如下:

        ALTER TABLE 表名 ADD 字段名 字段的类型名称(长度)

    例:

        alter table [student].[dbo].[test] add Used_Status int;

        alter table [student].[dbo].[test] add Allocate_Time datetime;

    字段类型长度如果不写会使用默认的

猜你喜欢

转载自www.cnblogs.com/makalochen/p/11912993.html