当前位置: 首页 > 工具软件 > CSQL > 使用案例 >

sql Server '(' 附近有语法错误。

长孙谦
2023-12-01

sql Server ‘(’ 附近有语法错误。

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]

–去掉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]

 类似资料: