[color=#FF6600]
- SQL code
USE [fdata]GO/****** 对象: Table [dbo].[T0230H] 脚本日期: 07/20/2012 17:14:47 ******/SET ANSI_NULLS OFFGOSET QUOTED_IDENTIFIER ONGOSET ANSI_PADDING OFFGOCREATE TABLE [dbo].[T0230H]([/color] [DjLsh] [int] NOT NULL, [DjBtZdh] [int] NULL, [DjFtZdh] [int] NULL, [DjStZdh] [int] NULL, [DjState] [char](4) NULL, [DjCount] [int] NULL, [F0001] [datetime] NULL, [F0003] [varchar](10) NULL, [F0002] [varchar](15) NULL, [F0005] [varchar](20) NULL, [F0004] [varchar](40) NULL, [F0007] [varchar](10) NULL, [F0018] [numeric](18, 4) NULL, [F0010] [numeric](18, 4) NULL, [F0019] [numeric](18, 4) NULL, [F0027] [numeric](18, 4) NULL, [F0028] [varchar](3) NULL, [F0021] [varchar](12) NULL, [F0022] [varchar](12) NULL, [F0033] [int] NULL, [F0034] [int] NULL, [F0035] [int] NULL,[color=#FF6600]PRIMARY KEY CLUSTERED ( [DjLsh] ASC)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]) ON [PRIMARY]GOSET ANSI_PADDING OFF
------解决方案--------------------
这就是创建表的脚本...
------解决方案--------------------
创建一个表,存放到primary文件中,数据库分为数据文件和日志文件,数据文件有且只有一个priamry,可以有其他文件组成一个文件组。你的这个表就是放到primary,那些SET的你可以不管,系统自动生成的。
在DjLsh列创建了一个聚集索引且作为主键。WITH后面代表索引的一些属性,比如STATISTICS_NORECOMPUTE =OFF ,不更新统计值、IGNORE_DUP_KEY = OFF 关闭【忽略重复值】,ALLOW_ROW_LOCKS = ON为开启行锁(涉及锁的知识)。ALLOW_PAGE_LOCKS = ON开启【页锁】,PAD_INDEX = OFF为关闭索引填充。
------解决方案--------------------