更新7万条数据只用两秒的存储过程--表结构源码

作者在 2014-02-26 14:54:36 发布以下内容

GO
/****** 对象:  Table [dbo].[OrderDetail] ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[OrderDetail](
 [ID] [int] IDENTITY(1,1) NOT NULL,
 [Guid] [uniqueidentifier] NOT NULL,
 [OrderGuid] [uniqueidentifier] NOT NULL,
 [DesignType] [int] NULL CONSTRAINT [DF_OrderDetail_DesignType]  DEFAULT ((1)),
 [POPOnlyCode] [nvarchar](500) COLLATE Chinese_PRC_CI_AS NULL,
 [POPCode] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
 [POPName] [nvarchar](100) COLLATE Chinese_PRC_CI_AS NOT NULL,
 [POPType] [nvarchar](100) COLLATE Chinese_PRC_CI_AS NOT NULL,
 [PointLocation] [nvarchar](100) COLLATE Chinese_PRC_CI_AS NULL,
 [MakeContent] [nvarchar](500) COLLATE Chinese_PRC_CI_AS NULL,
 [NetSizeWidth] [int] NOT NULL CONSTRAINT [DF__OrderDeta__NetSi__3587F3E0]  DEFAULT ((0)),
 [NetSizelength] [int] NOT NULL CONSTRAINT [DF__OrderDeta__NetSi__367C1819]  DEFAULT ((0)),
 [BleedWidth] [int] NOT NULL CONSTRAINT [DF__OrderDeta__Bleed__37703C52]  DEFAULT ((0)),
 [BleedLength] [int] NOT NULL CONSTRAINT [DF__OrderDeta__Bleed__3864608B]  DEFAULT ((0)),
 [BalanceWidth] [int] NOT NULL CONSTRAINT [DF__OrderDeta__Balan__395884C4]  DEFAULT ((0)),
 [BalanceLength] [int] NOT NULL CONSTRAINT [DF__OrderDeta__Balan__3A4CA8FD]  DEFAULT ((0)),
 [Amount] [int] NOT NULL CONSTRAINT [DF__OrderDeta__Amoun__3B40CD36]  DEFAULT ((1)),
 [EquipmentNameGuid] [uniqueidentifier] NULL,
 [EquipmentCurveGuid] [uniqueidentifier] NULL,
 [MakeDemand] [nvarchar](500) COLLATE Chinese_PRC_CI_AS NOT NULL,
 [Schedule] [nvarchar](100) COLLATE Chinese_PRC_CI_AS NULL,
 [Outsourcing] [uniqueidentifier] NULL,
 [HelpGuid] [uniqueidentifier] NULL,
 [ShippingDepartmentGuid] [uniqueidentifier] NULL,
 [SizeArea] [decimal](18, 4) NOT NULL CONSTRAINT [DF__OrderDeta__SizeA__3C34F16F]  DEFAULT ((0)),
 [BleedArea] [decimal](18, 4) NOT NULL CONSTRAINT [DF__OrderDeta__Bleed__3D2915A8]  DEFAULT ((0)),
 [settlementArea] [decimal](18, 4) NOT NULL CONSTRAINT [DF__OrderDeta__settl__3E1D39E1]  DEFAULT ((0)),
 [SettlementAmount] [decimal](18, 4) NOT NULL CONSTRAINT [DF__OrderDeta__Settl__3F115E1A]  DEFAULT ((0.00)),
 [PriceUnit] [decimal](18, 4) NULL CONSTRAINT [DF_OrderDetail_PriceUnit]  DEFAULT ((0)),
 [PriceSum] [decimal](18, 4) NULL,
 [Remarks] [nvarchar](500) COLLATE Chinese_PRC_CI_AS NULL,
 [Status] [bit] NOT NULL CONSTRAINT [DF_OrderDetail_Status]  DEFAULT ((1)),
 [AddData] [datetime] NOT NULL CONSTRAINT [DF_OrderDetail_AddData]  DEFAULT (getdate()),
 [UpdateData] [datetime] NOT NULL CONSTRAINT [DF_OrderDetail_UpdateData]  DEFAULT (getdate()),
 [ExtendInt1] [int] NULL,
 [ExtendInt2] [int] NULL,
 [ExtendInt3] [int] NULL,
 [ExtendString1] [nvarchar](500) COLLATE Chinese_PRC_CI_AS NULL,
 [ExtendString2] [nvarchar](500) COLLATE Chinese_PRC_CI_AS NULL,
 [ExtendString3] [nvarchar](500) COLLATE Chinese_PRC_CI_AS NULL
) ON [PRIMARY]

 GO
/****** 对象:  Table [dbo].[ShopInfo]******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[ShopInfo](
 [Guid] [uniqueidentifier] NOT NULL CONSTRAINT [DF_ShopInfo_Guid]  DEFAULT (newid()),
 [OrderGuid] [uniqueidentifier] NOT NULL,
 [POPGuid] [uniqueidentifier] NOT NULL,
 [CityGuid] [uniqueidentifier] NULL,
 [ShopOnlyCode] [nvarchar](500) COLLATE Chinese_PRC_CI_AS NULL,
 [ShopCode] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
 [ShopName] [nvarchar](500) COLLATE Chinese_PRC_CI_AS NULL,
 [DistributorOnlyCode] [nvarchar](500) COLLATE Chinese_PRC_CI_AS NULL,
 [DistributorCode] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
 [DistributorName] [nvarchar](500) COLLATE Chinese_PRC_CI_AS NULL,
 [CounterType] [nvarchar](100) COLLATE Chinese_PRC_CI_AS NULL,
 [InstallType] [nvarchar](100) COLLATE Chinese_PRC_CI_AS NULL,
 [Amount] [int] NULL,
 [ManDistribListGuid] [uniqueidentifier] NULL,
 [LogisticsGuid] [uniqueidentifier] NULL,
 [AddData] [datetime] NULL CONSTRAINT [DF_ShopInfo_AddData]  DEFAULT (getdate())
) ON [PRIMARY]

默认分类 | 阅读 1804 次
文章评论,共0条
游客请输入验证码
浏览141234次
文章分类