补充说明:主键与unique约束请使用下列方式处理:以5楼第二句为例 create table tb_11(id int,b int,c varchar(10) CONSTRAINT cons_A PRIMARY KEY (id ASC) ) ---------------------------------- alter table tb_11 drop constraint cons_A--先删除(索引名若不是自定义,请用sp_helpindex或其它方式找出) alter table tb_11 alter column id int not null--参与主键的列要为空 alter table tb_11 alter column b int not null--参与主键的列要为空 alter table tb_11 add CONSTRAINT cons_A PRIMARY KEY (id ASC,b desc) --b相当于"商品编号"