码迷,mamicode.com
首页 > 数据库 > 详细

sql alter表字段处理

时间:2014-08-11 17:16:52      阅读:230      评论:0      收藏:0      [点我收藏+]

标签:io   ar   cti   sql   ad   ef   table   har   

--添加字段

ALTER table WCOLLECTION add CLT_ID int null default(0)



--将已有字段类型为 NULL 修改为 NOT NULL
alter table table_name
alter column column_name char(20) not null

--添加主键
ALTER  table WCOLLECTION add primary key (CLT_ID)








sql alter表字段处理,布布扣,bubuko.com

sql alter表字段处理

标签:io   ar   cti   sql   ad   ef   table   har   

原文地址:http://www.cnblogs.com/ziye/p/3904756.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!