Sybase增加主键

使用Aqua Data Studio工具修改Sybase IQ表数据的时候,提示表主键不存在,于是增加表的主键信息:

--主键字段必须非空
alter table [表名] modify [字段名] not null;

--主键名不能少
alter table [表名] add constraint PK_[表名] primary key clustered ([字段名]);
 

猜你喜欢

转载自housen1987.iteye.com/blog/1558823