日期:2014-05-18  浏览次数:20453 次

SQL语句求解释,总是提示有错
use [register]
go
create table[dbo].[Register]
(
[id][int]identity(1,1)not null,
[username][nvarchar](50)collate chinese_prc_ci_as null,
[password][nvarchar](50)collate chinese_prc_ci_as null,
[sex][int]null,
[picture][nvarchar](50)collate chinese_prc_ci_as null,
[IM][nvarchar](50)collate chinese_prc_ci_as null,
[information][nvarchar](50)collate chinese_prc_ci_as null,
[others][nvarchar](50)collate chinese_prc_ci_as null,
[ifisuser][int]null,
constrain[PK_Register]primary key clustered
(
 [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]

------解决方案--------------------
探讨

引用:
...
constraint[PK_Register]primary key clustered
...

constraint是关键词,约束。你输错了,最后少了个t,改过来就可以用了。


加上t也不行啊 ,这个错误我看出来了。。。