CREATE TABLE [dbo].[goods](
[Pid] UNIQUEIDENTIFIER,
[CompanyCode] VARCHAR(50),
[GID] BIGINT,
[Code] VARCHAR(20),
[Name] VARCHAR(50),
[SPEC] VARCHAR(50),
[Sort] VARCHAR(50),
[Brand] VARCHAR(50),
[Code2] VARCHAR(50),
[GoodsStatus] VARCHAR(50),
[GoodsStatusName] VARCHAR(50),
[QPC] NUMERIC(18,2),
[QPCStr] NVARCHAR(100),
[Munit] VARCHAR(50),
[SALE] VARCHAR(50),
[SALETAX] NUMERIC(18,4),
[TaxRate] NUMERIC(18,4),
[Alc] VARCHAR(50),
[AlcQty] INT,
[SALCQSTART] INT,
[BCKSTORE] VARCHAR(100),
[BCKVEN] VARCHAR(100),
[INPRC] NUMERIC(18,4),
[DXPRC] NUMERIC(18,4),
[PAYRATE] MONEY,
[CNTINPRC] NUMERIC(18,4),
[LSTINPRC] NUMERIC(18,4),
[INVPRC] NUMERIC(18,4),
[distributionprc] NUMERIC(18,4),
[WHSPrc] NUMERIC(18,4),
[OLDINVPRC] NUMERIC(18,4),
[RTLPRC] NUMERIC(18,4),
[LWTRTLPRC] NUMERIC(18,4),
[TOPRTLPRC] NUMERIC(18,4),
[CHKVD] SMALLINT,
[MBRPRC] NUMERIC(18,4),
[BillTo] INT,
[isltd] INT,
[isBind] INT,
[ISPKG] INT,
[ISUnit] INT,
[BaseGoodsType] INT,
[ORDERQTY] INT,
[wrh] INT,
[Status] INT,
[Memo] VARCHAR(100),
[PROMOTE] SMALLINT,
[GFT] SMALLINT,
[GoodsAccountType] INT,
[salcqty] INT,
[AddTime] DATETIME,
[AddUser] VARCHAR(50),
[AddUserName] VARCHAR(50),
[AddIP] VARCHAR(50),
[UpdateTime] DATETIME,
[UpdateUser] VARCHAR(50),
[UpdateUserName] VARCHAR(50),
[UpdateIP] VARCHAR(50),
[DataStatus] SMALLINT,
[SSStart] DATETIME,
[SSEnd] DATETIME,
[FCATEGORY] VARCHAR(20),
[wd1] NVARCHAR(510),
[wd2] NVARCHAR(510),
[wdname1] NVARCHAR(510),
[wdname2] NVARCHAR(510),
[GRADE] NVARCHAR(510),
[VERSION] INT,
[dc_createtime] [datetime] NOT NULL default getdate()
CONSTRAINT [PK_goods] PRIMARY KEY NONCLUSTERED
(
[Pid] ASC,
[dc_createtime] DESC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
ON [ps_fg_Basetable_dc_createtime]([dc_createtime])
) ON [ps_fg_Basetable_dc_createtime]([dc_createtime])
GO
CREATE INDEX index_goods ON [goods]([dc_createtime])