数据库的问题
createtablestudentinfo(student_idnchar(10)null,student_namenchar(10)null,student_sexn...
create table studentinfo
(student_id nchar(10) null,
student_name nchar(10) null,
student_sex nchar(10) null,
student_bir datetime null,
student_class_no nchar(10) null,
student_tel nchar(11) null,
student_rdata datetime null,
address nchar(200) null,
memment nchar(1000) null,
photo image null,
constraint pk_studentinfo primary key clustered
(
student_id asc
)with(pad_index =off,statistics_norecompute =off,ignore_dup_key=off,
allow_row_locks =on,allow_page_locks =on)on primary
)on primary textimage_on primary
go
哪里有错,帮忙解决下 展开
(student_id nchar(10) null,
student_name nchar(10) null,
student_sex nchar(10) null,
student_bir datetime null,
student_class_no nchar(10) null,
student_tel nchar(11) null,
student_rdata datetime null,
address nchar(200) null,
memment nchar(1000) null,
photo image null,
constraint pk_studentinfo primary key clustered
(
student_id asc
)with(pad_index =off,statistics_norecompute =off,ignore_dup_key=off,
allow_row_locks =on,allow_page_locks =on)on primary
)on primary textimage_on primary
go
哪里有错,帮忙解决下 展开
1个回答
展开全部
create table studentinfo
(
student_id nchar(10) not null,
student_name nchar(10) null,
student_sex nchar(10) null,
student_bir datetime null,
student_class_no nchar(10) null,
student_tel nchar(11) null,
student_rdata datetime null,
address nchar(200) null,
memment nchar(1000) null,
photo image null,
constraint pk_studentinfo primary key clustered
(
student_id asc
)with(pad_index =off,statistics_norecompute =off,ignore_dup_key=off,allow_row_locks =on,allow_page_locks =on)on [PRIMARY]
)on [PRIMARY] textimage_on [PRIMARY]
go
第一:student_id 是主键,必须为 not null
第二:那三个on primary的primary外面必须加上中括号;以形成 [PRIMARY] 的形式
(
student_id nchar(10) not null,
student_name nchar(10) null,
student_sex nchar(10) null,
student_bir datetime null,
student_class_no nchar(10) null,
student_tel nchar(11) null,
student_rdata datetime null,
address nchar(200) null,
memment nchar(1000) null,
photo image null,
constraint pk_studentinfo primary key clustered
(
student_id asc
)with(pad_index =off,statistics_norecompute =off,ignore_dup_key=off,allow_row_locks =on,allow_page_locks =on)on [PRIMARY]
)on [PRIMARY] textimage_on [PRIMARY]
go
第一:student_id 是主键,必须为 not null
第二:那三个on primary的primary外面必须加上中括号;以形成 [PRIMARY] 的形式
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询