SQLserver常用创建表 添加字段sql
--删除主键alter table 表名 drop constraint 主键名--添加主键alter table 表名 add constraint 主键名 primary key(字段名1,字段名2……)--添加非聚集索引的主键alter table 表名 add constraint 主键名 primary key NONCLUSTERED(字段名1,字段名2……)--新建表:create table [表名]([自动编号字段] int IDENTITY (1,1) PRIMARY.