SQLServer '(' 附近有语法错误。 50
SETANSI_NULLSONGOSETQUOTED_IDENTIFIERONGOSETANSI_PADDINGONGOCREATETABLE[Accounts_User...
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [Accounts_UserType](
[UserType] [char](2) COLLATE Chinese_PRC_CI_AS NOT NULL,
[Description] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
CONSTRAINT [PK_Accounts_UserType] PRIMARY KEY CLUSTERED
(
[UserType] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
消息 170,级别 15,状态 1,第 7 行
第 7 行: '(' 附近有语法错误。
在复制表结构时 每张表都出这个错误 '(' 附近有语法错误。 请问是为什么啊
括号没有错误,在分析时没错,执行的时候就报错了 展开
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [Accounts_UserType](
[UserType] [char](2) COLLATE Chinese_PRC_CI_AS NOT NULL,
[Description] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
CONSTRAINT [PK_Accounts_UserType] PRIMARY KEY CLUSTERED
(
[UserType] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
消息 170,级别 15,状态 1,第 7 行
第 7 行: '(' 附近有语法错误。
在复制表结构时 每张表都出这个错误 '(' 附近有语法错误。 请问是为什么啊
括号没有错误,在分析时没错,执行的时候就报错了 展开
3个回答
展开全部
你总共用了两个()(),但是第一个括号只有( 没有后面的部分)
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
GO
SET ANSI_PADDING OFF
前面加个)看看.
SET ANSI_PADDING OFF
前面加个)看看.
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
正确的是
SET ANSI_PADDING ON
GO
CREATE TABLE [Accounts_UserType](
[UserType] [char](2) COLLATE Chinese_PRC_CI_AS NOT NULL,
[Description] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
CONSTRAINT [PK_Accounts_UserType] PRIMARY KEY CLUSTERED
(
[UserType] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
))
ON [PRIMARY]
GO
SET ANSI_PADDING OFF
SET ANSI_PADDING ON
GO
CREATE TABLE [Accounts_UserType](
[UserType] [char](2) COLLATE Chinese_PRC_CI_AS NOT NULL,
[Description] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
CONSTRAINT [PK_Accounts_UserType] PRIMARY KEY CLUSTERED
(
[UserType] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
))
ON [PRIMARY]
GO
SET ANSI_PADDING OFF
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询