SQL语句建表时设置id自增

sqlServer数据库 : 
create table tb(
id int identity(1,1),
name nvarchar(),
constraint pkid primary key (id)
)
mySql数据库:
create table student(
id INT primary key NOT NULL AUTO_INCREMENT,
name nvarchar()
);


你可能感兴趣的:(sql,id)