如何利用sql语句设置标识列

id为表stu的唯一主键
age和image字段的值允许为空如何设置ID为标识列。

use 数据库名称create table stu(id int primary key identity(1,1),age int ,[image] varchar(50)-----这个地方存图片名字就行了)检举
温馨提示:答案为网友推荐,仅供参考
第1个回答  2013-09-15
use 数据库名称create table stu( id int primary key identity(1,1), age int null, [image] image null)
第2个回答  2013-09-15
列名 int identity(标示种子,自增量)
相似回答