建表:
create table t1(a int not null,b int not null,c int not null)
加:
alter table t1 add constraint pk_1 primary key (a)
create table t1(a int not null,b int not null,c int not null)
加:
alter table t1 add constraint pk_1 primary key (a)
id int identity(1,1) not null constraint PK_sys_zj_fielddict primary key --设置id为标识列+主键
,name varchar(1000) not null
)
alter table 表名 add constraint pK_名称 primary key (列名)