修改表 添加

ALTER TABLE DeliberInfo DROP CONSTRAINT PK_DeliberInfo --删除主键


ALTER TABLE DeliberInfo DROP COLUMN DeliberContSeqNo --删除列
ALTER TABLE DeliberInfo ADD DeliberContTime DATETIME NOT NULL DEFAULT '1900-01-01 00:00:00.000' --添加列,并设置默认值

--添加主键,注意数据中以下的三个字段不能重复
ALTER TABLE DeliberInfo
ADD CONSTRAINT PK_DeliberInfo PRIMARY KEY CLUSTERED
(
ConferenceNo ASC,
VerNum ASC,
DeliberContTime ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]

posted @ 2016-03-20 16:45  一杯水M  阅读(205)  评论(0编辑  收藏  举报