日期:2014-05-19  浏览次数:20580 次

如何把2005的表原样导入2000中??
用2005的生成sql脚本,在2000下报错,因为语法不同
如果用导入程序,表的主键和列可否为null就没有了,表不完整,有什么方法

------解决方案--------------------
数据库的属性中选择级别为80即可。
------解决方案--------------------
选择数据库,右键属性,“选项”页,“兼容级别”选择为“SQL Server 2000(80)”然后生成脚本即可。
------解决方案--------------------
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[bykai_a_xs01_t_xs01](
[ID] [int] IDENTITY(1,1) NOT NULL,
[brand] [varchar](50) COLLATE Chinese_PRC_CI_AS NULL,
[area] [varchar](50) COLLATE Chinese_PRC_CI_AS NULL,
[dpnumber] [int] NULL,
[dpnumber_ly] [int] NULL,
[aim_price_tm] [decimal](12, 1) NULL,
[sale_price] [decimal](12, 1) NULL,
[sale_price_ntm] [decimal](12, 1) NULL,
[aim_price_dcl] [int] NULL,
[sale_price_ly] [decimal](12, 1) NULL,
[grow] [int] NULL,
[ddgrow] [int] NULL,
[brand_id] [varchar](50) COLLATE Chinese_PRC_CI_AS NULL,
[StartDate] [datetime] NULL,
[EndDate] [datetime] NULL,
[InsertDate] [datetime] NULL,
[a_cequence] [int] NULL,
CONSTRAINT [PK_bykai_a_xs01_t_xs01] PRIMARY KEY CLUSTERED
(
[ID] ASC
)
ON [PRIMARY]
)