摘要: 1.新建一数据表,里面有字段id,将id设为为主键create table tb(id int,constraint pkid primary key (id))create table tb(id int primary key )2.新建一数据表,里面有字段id,将id设为主键且自动编号create table tb(id int identity(1,1),constraint pkid primary key (id))create table tb(id int identity(1,1) primary key )3.已经建好一数据表,里面有字段id,将id设为主键alter ta 阅读全文