sql Server '(' 附近有语法错误。
USE[MyCRM]GOSETANSI_NULLSONGOSETQUOTED_IDENTIFIERONGOCREATETABLE[dbo].[公司信息]([公司名称][n...
USE [MyCRM]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[公司信息](
[公司名称] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL,
[法人代表] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL,
[公司地址] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL,
[服务电话] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL,
[邮政编码] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL,
[电子邮件] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL,
[公司网站] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL,
[管理系统背景照片] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL,
[管理系统显示名称] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL,
[显示优先级] [int] NULL,
C0ONSTRAINT [PK_公司信息] PRIMARY KEY CLUSTERED
(
[公司名称] ASC
) WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
高手麻烦看看哪里错了 跪谢 展开
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[公司信息](
[公司名称] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL,
[法人代表] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL,
[公司地址] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL,
[服务电话] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL,
[邮政编码] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL,
[电子邮件] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL,
[公司网站] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL,
[管理系统背景照片] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL,
[管理系统显示名称] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL,
[显示优先级] [int] NULL,
C0ONSTRAINT [PK_公司信息] PRIMARY KEY CLUSTERED
(
[公司名称] ASC
) WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
高手麻烦看看哪里错了 跪谢 展开
1个回答
展开全部
--去掉WITH (IGNORE_DUP_KEY = OFF) 索引选项,这是SQL05以上的建表选项,SQL2000不支持
USE [MyCRM]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[公司信息](
[公司名称] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL,
[法人代表] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL,
[公司地址] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL,
[服务电话] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL,
[邮政编码] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL,
[电子邮件] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL,
[公司网站] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL,
[管理系统背景照片] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL,
[管理系统显示名称] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL,
[显示优先级] [int] NULL,
C0ONSTRAINT [PK_公司信息] PRIMARY KEY CLUSTERED
(
[公司名称] ASC
) ON [PRIMARY]
) ON [PRIMARY]
USE [MyCRM]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[公司信息](
[公司名称] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL,
[法人代表] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL,
[公司地址] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL,
[服务电话] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL,
[邮政编码] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL,
[电子邮件] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL,
[公司网站] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL,
[管理系统背景照片] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL,
[管理系统显示名称] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL,
[显示优先级] [int] NULL,
C0ONSTRAINT [PK_公司信息] PRIMARY KEY CLUSTERED
(
[公司名称] ASC
) ON [PRIMARY]
) ON [PRIMARY]
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询