if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[fn_GetFilePath]') and xtype in (N'FN', N'IF', N'TF'))
drop function [dbo].[fn_GetFilePath]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[p_backupdb]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[p_backupdb]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[AD]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[AD]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Admin]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Admin]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[AdvancePayment]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[AdvancePayment]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Article]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Article]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[ArticleCategory]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[ArticleCategory]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Bulletin]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Bulletin]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[CardContent]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[CardContent]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[CatCompany]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[CatCompany]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[CatProduct]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[CatProduct]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Category]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Category]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Compic]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Compic]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Config]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Config]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Currency]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Currency]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[CustomFieldItem]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[CustomFieldItem]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Email]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Email]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Favorite]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Favorite]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FiltrateIP]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[FiltrateIP]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Freepro]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Freepro]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Getnews]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Getnews]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Link]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Link]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[LoginLog]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[LoginLog]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Member]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Member]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[MemberGroup]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[MemberGroup]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[MemberSerial]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[MemberSerial]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[News_Article]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[News_Article]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[News_Category]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[News_Category]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[OrderProduct]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[OrderProduct]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[OrderProductItem]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[OrderProductItem]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[OrderReview]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[OrderReview]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Orders]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Orders]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Payment]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Payment]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Poll]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Poll]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Product]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Product]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[ProductCustomField]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[ProductCustomField]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[ProductField]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[ProductField]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Review]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Review]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[ReviewFeed]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[ReviewFeed]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Shipping]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Shipping]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[ShippingArea]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[ShippingArea]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[ShippingExpression]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[ShippingExpression]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[ShippingPrice]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[ShippingPrice]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[ShoppingCart]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[ShoppingCart]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[ShoppingCartProductItems]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[ShoppingCartProductItems]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Template]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Template]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[adlist]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[adlist]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[advancePay]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[advancePay]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[allbuy]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[allbuy]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[areatype]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[areatype]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[blank]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[blank]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[canshu]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[canshu]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[card]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[card]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[cardconsums]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[cardconsums]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[directory]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[directory]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[directoryPic]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[directoryPic]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[djqrec]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[djqrec]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[game]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[game]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[jforder]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[jforder]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[jfrec]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[jfrec]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[liuyan]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[liuyan]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[pinpai]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[pinpai]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[proTopic]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[proTopic]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[province]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[province]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[score]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[score]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tb_Company]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tb_Company]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tb_Stock]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tb_Stock]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tb_order]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tb_order]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tellpic]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tellpic]
GO

SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS OFF 
GO

/*创建函数,得到文件得路径*/
    create function fn_GetFilePath(@filename nvarchar(260))
    returns nvarchar(260)   
    as
    begin
     declare @file_path nvarchar(260)
     declare @filename_reverse nvarchar(260)
     select @filename_reverse=reverse(@filename)
     select @file_path=substring(@filename,1,len(@filename)+1-charindex( ' ' ,@filename_reverse))
     return @file_path
    end
GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO

CREATE TABLE [dbo].[AD] (
	[ADID] [int] NOT NULL ,
	[Name] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Content] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[ADWidth] [int] NULL ,
	[ADHight] [int] NULL ,
	[ADTop] [int] NULL ,
	[ADLeft] [int] NULL ,
	[IsOpen] [tinyint] NULL ,
	[AdType] [int] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[Admin] (
	[AdminID] [int] NOT NULL ,
	[Flag] [int] NULL ,
	[Power] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[MemberID] [int] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[AdvancePayment] (
	[AdvancePaymentID] [int] NOT NULL ,
	[MemberID] [int] NOT NULL ,
	[AdvancePayment] [money] NOT NULL ,
	[Remark] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[WorkPeople] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[AddTime] [smalldatetime] NOT NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[Article] (
	[ArticleID] [int] NOT NULL ,
	[Title] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[Content] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[ArticleCategoryID] [int] NOT NULL ,
	[AddTime] [smalldatetime] NOT NULL ,
	[lx] [int] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[ArticleCategory] (
	[ArticleCategoryID] [int] NOT NULL ,
	[CategoryName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[CategoryType] [int] NOT NULL ,
	[Url] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[NewWindow] [tinyint] NOT NULL ,
	[Meta] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[CategoryAD] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[Number] [int] NOT NULL ,
	[Sort] [int] NOT NULL ,
	[Status] [int] NOT NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[Bulletin] (
	[BulletinId] [int] NOT NULL ,
	[Title] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Body] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[MemberID] [int] NULL ,
	[AddTime] [smalldatetime] NULL ,
	[EndTime] [smalldatetime] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[CardContent] (
	[CardContentID] [int] NOT NULL ,
	[Account] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[Pass] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[AddTime] [smalldatetime] NULL ,
	[IsSold] [tinyint] NOT NULL ,
	[SaleTime] [smalldatetime] NULL ,
	[OrderID] [int] NOT NULL ,
	[ProductID] [int] NOT NULL ,
	[MemberID] [int] NOT NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[CatCompany] (
	[CategoryID] [int] NULL ,
	[ProductID] [int] NULL ,
	[Sort] [int] NULL ,
	[AddTime] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[CatProduct] (
	[CategoryID] [int] NOT NULL ,
	[ProductID] [int] NOT NULL ,
	[Sort] [int] NOT NULL ,
	[AddTime] [smalldatetime] NOT NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[Category] (
	[CategoryID] [int] NOT NULL ,
	[Name] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[CustomField] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ParentID] [int] NOT NULL ,
	[CanAdd] [tinyint] NOT NULL ,
	[ProductNum] [int] NOT NULL ,
	[ProductPageSize] [int] NOT NULL ,
	[InBar] [tinyint] NOT NULL ,
	[InNav] [tinyint] NOT NULL ,
	[PicsAndCSS] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[Logo] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[ProductAd] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[HeadAd] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[LastUpdate] [smalldatetime] NULL ,
	[ParentPath] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[ChildIDs] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Depth] [int] NULL ,
	[Child] [int] NULL ,
	[Sort] [int] NULL ,
	[IsActive] [tinyint] NULL ,
	[IsDeleted] [tinyint] NOT NULL ,
	[IsShow] [int] NULL ,
	[bm] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[sad] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[xad] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[bj] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[color] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[bold] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[title] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[keywords] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[description] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[jgchoose] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[rx] [int] NULL ,
	[isml] [int] NULL ,
	[stgg] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[isdy] [int] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[Compic] (
	[id] [int] NOT NULL ,
	[Wyuploadb] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Wyuploads] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[mid] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[addtime] [datetime] NULL ,
	[sjid] [int] NULL ,
	[isvoid] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[Config] (
	[ConfigID] [int] NOT NULL ,
	[SiteName] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[SiteUrl] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[CompanyName] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Linkman] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Phone] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Mobile] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Email] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Postalcode] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[Address] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[SiteLogo] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[SiteTitle] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[MetaDescription] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[MetaKeywords] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[Copyright] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[SmtpServer] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[SmtpAccount] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[SmtpPassword] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[SmtpMailbox] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[SmtpPort] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[SmtpValidate] [tinyint] NOT NULL ,
	[SmtpCode] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[DateFormat] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[MarkUnit] [int] NULL ,
	[ShopStop] [tinyint] NOT NULL ,
	[ShopStopWords] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[UseCache] [tinyint] NOT NULL ,
	[CacheTime] [int] NULL ,
	[LinkAllowApply] [tinyint] NOT NULL ,
	[LinkLogoWidth] [int] NULL ,
	[LinkLogoHeight] [int] NULL ,
	[UploadType] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[MaxFileSize] [int] NULL ,
	[ProductPageSize] [int] NULL ,
	[BulletinSizeInIndex] [int] NULL ,
	[NewProductSizeInIndex] [int] NULL ,
	[HotProductSizeInIndex] [int] NULL ,
	[CommendProductSizeInIndex] [int] NULL ,
	[DiscountProductSizeInIndex] [int] NULL ,
	[Language] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[TemplateFolder] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[StatsToolName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[StatsCode] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[StatsLoginUrl] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[DefaultHeadAD] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[StorageAlert] [int] NULL ,
	[OrderNumberRule] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[AliPaySettings] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Settings] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[html] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[SCode] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[PhoneMessage] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[uKeyEnabled] [int] NULL ,
	[UKeyCode] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[WatermarkText] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[tc] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Maxtc] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[imginfo] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[Ls] [int] NULL ,
	[dateshow] [int] NULL ,
	[zs] [int] NULL ,
	[topictemp] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[iskf] [int] NULL ,
	[isfs] [int] NULL ,
	[iszsh] [int] NULL ,
	[ispsh] [int] NULL ,
	[iszjf] [int] NULL ,
	[iszdjq] [money] NULL ,
	[ispjf] [int] NULL ,
	[ispdjq] [money] NULL ,
	[istjf] [int] NULL ,
	[istdjq] [money] NULL ,
	[ishs] [int] NULL ,
	[istsh] [int] NULL ,
	[ishyck] [int] NULL ,
	[istgjf] [int] NULL ,
	[Serial] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[dljf] [int] NULL ,
	[dltc] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[dztc] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[googleKey] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[yddjq] [money] NULL ,
	[cityname] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[picCore] [int] NULL ,
	[yajhs] [int] NULL ,
	[dxto] [int] NULL ,
	[tg] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[swj] [int] NULL ,
	[xwj] [int] NULL ,
	[dxyz] [int] NULL ,
	[psf] [money] NULL ,
	[fl] [money] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[Currency] (
	[CurrencyID] [int] NOT NULL ,
	[Name] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Code] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Sign] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Rate] [money] NULL ,
	[IsDefault] [tinyint] NOT NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[CustomFieldItem] (
	[CustomFieldItemID] [int] NOT NULL ,
	[ShopProductID] [int] NULL ,
	[ProductID] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[FieldID] [int] NULL ,
	[ItemName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Price] [money] NULL ,
	[Selected] [tinyint] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[Email] (
	[EmailID] [int] NOT NULL ,
	[Centent] [ntext] COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[Favorite] (
	[FavoriteID] [int] NOT NULL ,
	[MemberID] [int] NOT NULL ,
	[ProductID] [int] NOT NULL ,
	[AddTime] [smalldatetime] NOT NULL ,
	[ispl] [int] NOT NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[FiltrateIP] (
	[FiltrateID] [int] NOT NULL ,
	[IP] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[lx] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[Freepro] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[name] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[jf] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[sl] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[bx] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[bimg] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[simg] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[sm] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[price] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[lb] [int] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[Getnews] (
	[id] [int] NOT NULL ,
	[url] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[stardiv] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[enddiv] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[newsid] [int] NULL ,
	[addtime] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[newsdiv] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[newediv] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[newurl] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[titlesdiv] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[titleediv] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[cjname] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[code] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[fyurl] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[ys] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[Link] (
	[LinkID] [int] NOT NULL ,
	[Name] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[Url] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Remark] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Logo] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[AddTime] [smalldatetime] NOT NULL ,
	[Sort] [int] NOT NULL ,
	[Home] [tinyint] NOT NULL ,
	[Passed] [tinyint] NOT NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[LoginLog] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[memid] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[memname] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[memip] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[addtime] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[Member] (
	[MemberID] [int] NOT NULL ,
	[Name] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[Password] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[Email] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[HideEmail] [tinyint] NOT NULL ,
	[GroupId] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Remarks] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[AddDate] [smalldatetime] NOT NULL ,
	[QQ] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[ICQ] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[MSN] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[Question] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Answer] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Sex] [tinyint] NOT NULL ,
	[Birthday] [smalldatetime] NULL ,
	[Realname] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[LastLog] [smalldatetime] NULL ,
	[LogTimes] [int] NULL ,
	[Photo] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Introduction] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[AdvancePayment] [money] NULL ,
	[Score] [int] NULL ,
	[Status] [int] NOT NULL ,
	[tel] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[recman] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[sellpws] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[djq] [money] NULL ,
	[isd] [int] NULL ,
	[Serial] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ParentID] [int] NULL ,
	[ParentPath] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[Depth] [int] NULL ,
	[sheng] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[shi] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[shaddress] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[shname] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[shtel] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[shcode] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[agent] [int] NULL ,
	[gamecj] [int] NULL ,
	[ip] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[mobcode] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ecs] [int] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[MemberGroup] (
	[MemberGroupID] [int] NOT NULL ,
	[GroupName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Discount] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[mone] [decimal](18, 0) NULL ,
	[sj] [int] NULL ,
	[score] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[MemberSerial] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[xlh] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[isUse] [int] NULL ,
	[mid] [int] NULL ,
	[mname] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[News_Article] (
	[ArticleID] [int] NOT NULL ,
	[Title] [nvarchar] (150) COLLATE Chinese_PRC_CI_AS NULL ,
	[Content] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[RootID] [int] NULL ,
	[CategoryID] [int] NULL ,
	[CategoryName] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[images] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[AddTime] [smalldatetime] NULL ,
	[Writer] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ArticleFrom] [nvarchar] (150) COLLATE Chinese_PRC_CI_AS NULL ,
	[Hits] [int] NULL ,
	[Keys] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[IsHtml] [tinyint] NULL ,
	[IsHot] [tinyint] NULL ,
	[IsTop] [tinyint] NULL ,
	[IsShow] [tinyint] NULL ,
	[UserName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[IsBest] [tinyint] NULL ,
	[IsCreate] [tinyint] NULL ,
	[EssayNum] [int] NULL ,
	[isFormatRed] [int] NULL ,
	[isInfo] [int] NULL ,
	[iscuxiao] [int] NULL ,
	[sjid] [int] NULL ,
	[issnews] [int] NULL ,
	[islnews] [int] NULL ,
	[area] [int] NULL ,
	[shux] [ntext] COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[News_Category] (
	[CategoryID] [int] NOT NULL ,
	[CategoryName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ParentID] [int] NULL ,
	[ParentPath] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[ChildIDs] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Depth] [int] NULL ,
	[RootID] [int] NULL ,
	[Sort] [int] NULL ,
	[Child] [int] NULL ,
	[Readme] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[IsActive] [tinyint] NULL ,
	[ArticleNum] [int] NULL ,
	[IsSy] [int] NULL ,
	[leftad] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[rightad] [ntext] COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[OrderProduct] (
	[OrderProductID] [int] NOT NULL ,
	[OrderID] [int] NOT NULL ,
	[ProductID] [int] NOT NULL ,
	[Items] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Quantity] [int] NOT NULL ,
	[UnitPrice] [money] NOT NULL ,
	[SubPrice] [money] NOT NULL ,
	[ItemsPrice] [money] NULL ,
	[Remark] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[IsConfirmed] [tinyint] NOT NULL ,
	[IsPayed] [tinyint] NOT NULL ,
	[IsShipped] [tinyint] NOT NULL ,
	[IsFinished] [tinyint] NOT NULL ,
	[IsDiscount] [tinyint] NOT NULL ,
	[ProductName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[prol] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[kbids] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[sjid] [int] NULL ,
	[istg] [int] NULL ,
	[cylx] [int] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[OrderProductItem] (
	[OrderProductItemID] [int] NOT NULL ,
	[OrderProductID] [int] NULL ,
	[Quantity] [int] NULL ,
	[FieldItemID] [int] NULL ,
	[FieldItemName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ItemPrice] [money] NULL ,
	[AddTime] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[OrderReview] (
	[OrderReviewID] [int] NOT NULL ,
	[OrderID] [int] NOT NULL ,
	[Body] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Reply] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[Type] [int] NOT NULL ,
	[AddTime] [smalldatetime] NOT NULL ,
	[IP] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[isyd] [int] NULL ,
	[sjid] [int] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[Orders] (
	[OrderID] [int] NOT NULL ,
	[MemberID] [int] NOT NULL ,
	[OrderTime] [smalldatetime] NOT NULL ,
	[ShipTime] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[BuyerName] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[BuyerPhone] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[BuyerEmail] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[BuyerAddress] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[BuyerPostalcode] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[ReceiverName] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[ReceiverPhone] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[ReceiverEmail] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[ReceiverAddress] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[ReceiverPostalcode] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[Remark] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[TotalPrice] [money] NULL ,
	[ProductPrice] [money] NULL ,
	[CustomItemPrice] [money] NULL ,
	[Discount] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ShipPrice] [money] NULL ,
	[AdvancePayment] [money] NULL ,
	[PaymentType] [int] NULL ,
	[ShippingType] [int] NULL ,
	[Score] [int] NULL ,
	[Weight] [numeric](10, 0) NULL ,
	[Quantity] [int] NULL ,
	[NeedInvoice] [tinyint] NULL ,
	[InvoiceHead] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[IsCancelled] [tinyint] NULL ,
	[IsConfirmed] [tinyint] NULL ,
	[PayStatus] [int] NULL ,
	[ShippingStatus] [int] NULL ,
	[IsFinished] [tinyint] NULL ,
	[ManageHistory] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[LastModify] [int] NULL ,
	[OrderNo] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[istc] [int] NULL ,
	[fpinfo] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[dxdjq] [money] NULL ,
	[realprice] [money] NULL ,
	[dcode] [int] NULL ,
	[isyd] [int] NULL ,
	[sjid] [int] NULL ,
	[istg] [int] NULL ,
	[cylx] [int] NULL ,
	[psf] [money] NULL ,
	[ordertype] [int] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[Payment] (
	[PaymentID] [int] NOT NULL ,
	[Name] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[InterfaceID] [int] NOT NULL ,
	[UserID] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[PrivateKey] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[SupportCoins] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Description] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[Sort] [int] NULL ,
	[Status] [int] NULL ,
	[lx] [int] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[Poll] (
	[PollID] [int] NOT NULL ,
	[Title] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Items] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Vote] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Multiple] [tinyint] NOT NULL ,
	[inIndex] [tinyint] NOT NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[Product] (
	[ProductID] [int] NOT NULL ,
	[Name] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[ProductNo] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Brand] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[CustomFieldValues] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[ShortDesc] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Unit] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Weight] [money] NOT NULL ,
	[MarketPrice] [money] NOT NULL ,
	[MemberPrice] [money] NOT NULL ,
	[Score] [int] NULL ,
	[ThumbnailImg] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[ProductImg] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Description] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[Storage] [int] NULL ,
	[MiniNum] [int] NULL ,
	[IsForSale] [tinyint] NOT NULL ,
	[IsCommend] [tinyint] NOT NULL ,
	[IsHot] [tinyint] NOT NULL ,
	[IsSpecialOffer] [tinyint] NOT NULL ,
	[AddTime] [smalldatetime] NOT NULL ,
	[Status] [int] NULL ,
	[Sort] [int] NULL ,
	[IsVirtual] [tinyint] NOT NULL ,
	[CanReview] [tinyint] NOT NULL ,
	[IsDiscount] [tinyint] NOT NULL ,
	[RelatedProductIDs] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[RelatedImgs] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Hits] [int] NULL ,
	[Min] [int] NULL ,
	[sellnum] [int] NULL ,
	[stj] [int] NULL ,
	[srecom] [int] NULL ,
	[syh] [int] NULL ,
	[title] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[keywords] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[jieshao] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[news] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[pj] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[ProType] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[StartDate] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[EndDate] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Alinum] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Kbpro] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[ThumbnailImgc] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[yhq] [money] NULL ,
	[zrelatedImgs] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[spcs] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[bzqd] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[zengs] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[yxdjq] [int] NULL ,
	[yxsl] [money] NULL ,
	[xqpro] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[gmpro] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[Zsprice] [money] NULL ,
	[sjid] [int] NULL ,
	[isyf] [int] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[ProductCustomField] (
	[ProductCustomFieldID] [int] NOT NULL ,
	[ProductID] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[FieldName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Multiple] [tinyint] NULL ,
	[Countable] [tinyint] NULL ,
	[ItemNum] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[ProductField] (
	[ProductFieldID] [int] NOT NULL ,
	[FieldName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[FieldValues] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[AddToAdvSearch] [tinyint] NULL ,
	[IsMultiple] [tinyint] NULL ,
	[isRadio] [int] NULL ,
	[lx] [int] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[Review] (
	[ReviewID] [int] NOT NULL ,
	[ProductID] [int] NOT NULL ,
	[UserName] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[Email] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[HideEmail] [tinyint] NULL ,
	[Body] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[Reply] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[AddTime] [smalldatetime] NOT NULL ,
	[IP] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[MemberID] [int] NOT NULL ,
	[Status] [int] NULL ,
	[Score] [int] NULL ,
	[ispl] [int] NULL ,
	[hid] [int] NULL ,
	[rjxf] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[pjxz] [int] NULL ,
	[zhichi] [int] NULL ,
	[fandui] [int] NULL ,
	[jbcontent] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[gid] [int] NULL ,
	[xid] [int] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[ReviewFeed] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[rid] [int] NULL ,
	[hnr] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[addtime] [smalldatetime] NULL ,
	[mid] [int] NULL ,
	[pjxz] [int] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[Shipping] (
	[ShippingID] [int] NOT NULL ,
	[Name] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Price] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Description] [ntext] COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[ShippingArea] (
	[ShippingAreaID] [int] NOT NULL ,
	[Name] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Code] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ParentID] [int] NOT NULL ,
	[Description] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[Sort] [int] NULL ,
	[isfx] [int] NULL ,
	[lx] [int] NULL ,
	[depth] [int] NULL ,
	[ParentPath] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[ChildIDs] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[qyad] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[leftdpad] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[rightdpad] [ntext] COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[ShippingExpression] (
	[ShippingExpressionID] [int] NOT NULL ,
	[Name] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Expression] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[ShippingPrice] (
	[ShippingPriceID] [int] NOT NULL ,
	[ShippingAreaID] [int] NOT NULL ,
	[ShippingID] [int] NOT NULL ,
	[ShippingExpression] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[ShoppingCart] (
	[RecordID] [int] NOT NULL ,
	[CartID] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Quantity] [int] NOT NULL ,
	[ProductID] [int] NOT NULL ,
	[Items] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[AddTime] [smalldatetime] NOT NULL ,
	[kbids] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[istg] [int] NULL ,
	[cylx] [int] NULL ,
	[sjid] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[ShoppingCartProductItems] (
	[ItemID] [int] NOT NULL ,
	[RecordID] [int] NULL ,
	[Quantity] [int] NULL ,
	[FieldItemID] [int] NULL ,
	[AddTime] [smalldatetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[Template] (
	[TemplateID] [int] NOT NULL ,
	[Name] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Folder] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[Sort] [int] NOT NULL ,
	[qb] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[adlist] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[dt] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[xt] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[url] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[dx] [int] NULL ,
	[sjid] [int] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[advancePay] (
	[AdvancePaymentID] [int] NOT NULL ,
	[MemberID] [int] NOT NULL ,
	[AdvancePayment] [money] NOT NULL ,
	[Remark] [ntext] COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[WorkPeople] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[AddTime] [smalldatetime] NOT NULL ,
	[paystyle] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[payorderno] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[type] [int] NULL ,
	[issucess] [int] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[allbuy] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[mid] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[pid] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[zt] [int] NULL ,
	[zprice] [money] NULL ,
	[proid] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[areatype] (
	[id] [int] NOT NULL ,
	[areaName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[lx] [int] NULL ,
	[sjid] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[blank] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[kb] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[canshu] (
	[id] [int] NOT NULL ,
	[setconfig] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[tj] [int] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[card] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[carno] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[carpass] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[carname] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[tclx] [int] NULL ,
	[price] [money] NULL ,
	[cshu] [int] NULL ,
	[isyx] [int] NULL ,
	[sxdate] [smalldatetime] NULL ,
	[xsqd] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[iszc] [int] NULL ,
	[isfs] [int] NULL ,
	[membername] [int] NULL ,
	[zcdate] [smalldatetime] NULL ,
	[zcip] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[xfcs] [money] NULL ,
	[gkbz1] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[gkbz2] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[bmbz1] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[bmbz2] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[bmbz3] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[addtime] [smalldatetime] NULL ,
	[hym] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[zccs] [int] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[cardconsums] (
	[id] [int] NOT NULL ,
	[carid] [int] NULL ,
	[carno] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[carname] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[prono] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[proname] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[cshu] [money] NULL ,
	[addtime] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[orderno] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[pid] [ntext] COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[directory] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[dq] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ml] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[dz] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[yb] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[sjr] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[sj] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[dh] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[email] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[bz] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[addtime] [smalldatetime] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[directoryPic] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[fxdq] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[title] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[bigpic] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[smallpic] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[addtime] [smalldatetime] NULL ,
	[logo] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[bj] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[fm] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[fd] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[nry] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[isRcom] [int] NULL ,
	[Wjj] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[djqrec] (
	[AdvancePaymentID] [int] NOT NULL ,
	[MemberID] [int] NOT NULL ,
	[AdvancePayment] [money] NOT NULL ,
	[Remark] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[WorkPeople] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[AddTime] [smalldatetime] NOT NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[game] (
	[id] [int] NOT NULL ,
	[gamename] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[gameurl] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[about] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[click] [int] NULL ,
	[addtime] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[gamecode] [int] NULL ,
	[gamekey] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[tj] [int] NULL ,
	[gid] [int] NULL ,
	[width] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[height] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[xxpic] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[jforder] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[member] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[productid] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[tel] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[sj] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[dz] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[truename] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[other] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[bz] [int] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[jfrec] (
	[AdvancePaymentID] [int] NOT NULL ,
	[MemberID] [int] NOT NULL ,
	[AdvancePayment] [int] NOT NULL ,
	[Remark] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[WorkPeople] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[AddTime] [smalldatetime] NOT NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[liuyan] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[niname] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[qq] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[mail] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[web] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[title] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[icon] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[content] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[ldate] [smalldatetime] NOT NULL ,
	[mereturn] [ntext] COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[pinpai] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[pname] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[pid] [int] NULL ,
	[ppic] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[tj] [int] NULL ,
	[sm] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[rs] [int] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[proTopic] (
	[id] [int] NOT NULL ,
	[ztname] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[ztpic] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ztsp] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[ztwjj] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ztlj] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[ismb] [int] NULL ,
	[addtime] [smalldatetime] NULL ,
	[jies] [int] NULL ,
	[istp] [int] NULL ,
	[iswz] [int] NULL ,
	[syXtp] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[qymb] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[zlei] [int] NULL ,
	[hddate] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[hdjj] [ntext] COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[province] (
	[id] [int] NOT NULL ,
	[code] [int] NULL ,
	[name] [nvarchar] (40) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[score] (
	[sid] [int] IDENTITY (1, 1) NOT NULL ,
	[score] [nvarchar] (53) COLLATE Chinese_PRC_CI_AS NULL ,
	[uid] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[gamecode] [smallint] NULL ,
	[stime] [smalldatetime] NULL ,
	[province] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[gdate] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ub] [smallint] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tb_Company] (
	[id] [int] NOT NULL ,
	[user] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[password] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[CompanyName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[CompanyType] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[CompanyShort] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[CompanyAddress] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Postalcode] [int] NULL ,
	[Tel] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Fax] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Linkman] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[Bank] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[BandAccounts] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Username] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[AddTime] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[sheng] [int] NULL ,
	[shi] [int] NULL ,
	[djq] [money] NULL ,
	[sl] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[sj] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[nr] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[morepic] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[xxpic] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[isvoid] [int] NULL ,
	[isdiscount] [int] NULL ,
	[disnum] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[CustomFieldValues] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[disword] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[advert] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[pj] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[zrelatedImgs] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[moreUploadb] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[moreUploads] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[Email] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[sellnum] [int] NULL ,
	[latitude] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[longtitude] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[wei] [int] NULL ,
	[zheng] [int] NULL ,
	[isclose] [int] NULL ,
	[Hits] [int] NULL ,
	[VertiW] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[VertiY] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[kw] [int] NULL ,
	[hj] [int] NULL ,
	[fw] [int] NULL ,
	[sd] [int] NULL ,
	[reviewnum] [int] NULL ,
	[xfe] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[IsCommend] [int] NULL ,
	[stj] [int] NULL ,
	[endsj] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ispp] [int] NULL ,
	[ip] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[istg] [int] NULL ,
	[sylx] [int] NULL ,
	[sygz] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[istop] [int] NULL ,
	[templete] [int] NULL ,
	[bigpic] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[iscz] [int] NULL ,
	[years] [int] NULL ,
	[sdate] [smalldatetime] NULL ,
	[isad] [int] NULL ,
	[ishf] [int] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[tb_Stock] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[CommodityId] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[CompanyId] [int] NULL ,
	[Number] [int] NULL ,
	[Pirce] [money] NULL ,
	[StockDate] [smalldatetime] NULL ,
	[SettlementType] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Payment] [money] NULL ,
	[FactPayment] [money] NULL ,
	[NotPayment] [money] NULL ,
	[ManageMan] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[ManageTel] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Username] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[AddTime] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[ClientId] [int] NULL ,
	[Type] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[ddno] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[zt] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[bz] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[CompanyName] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[fkzt] [int] NULL ,
	[sdate] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[sman] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[stel] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[szx] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[sfhdate] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[sbz] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[jszt] [int] NULL ,
	[cpbh] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[tb_order] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[CommodityId] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[CompanyId] [int] NULL ,
	[Number] [int] NULL ,
	[Pirce] [money] NULL ,
	[StockDate] [smalldatetime] NULL ,
	[SettlementType] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Payment] [money] NULL ,
	[FactPayment] [money] NULL ,
	[NotPayment] [money] NULL ,
	[ManageMan] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[ManageTel] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Username] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[AddTime] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[ClientId] [int] NULL ,
	[Type] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[ddno] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[zt] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[bz] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[CompanyName] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[fkzt] [int] NULL ,
	[sdate] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[sman] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[stel] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[szx] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[sfhdate] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[sbz] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[jszt] [int] NULL ,
	[gname] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[gaddress] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[gtel] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[gsliver] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[gismoney] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[fhdh] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[cpbh] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[tellpic] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[dt] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[AD] WITH NOCHECK ADD 
	CONSTRAINT [PK_AD] PRIMARY KEY  CLUSTERED 
	(
		[ADID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[Admin] WITH NOCHECK ADD 
	CONSTRAINT [PK_Admin] PRIMARY KEY  CLUSTERED 
	(
		[AdminID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[AdvancePayment] WITH NOCHECK ADD 
	CONSTRAINT [PK_AdvancePayment] PRIMARY KEY  CLUSTERED 
	(
		[AdvancePaymentID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[Article] WITH NOCHECK ADD 
	CONSTRAINT [PK_Article] PRIMARY KEY  CLUSTERED 
	(
		[ArticleID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[ArticleCategory] WITH NOCHECK ADD 
	CONSTRAINT [PK_ArticleCategory] PRIMARY KEY  CLUSTERED 
	(
		[ArticleCategoryID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[Bulletin] WITH NOCHECK ADD 
	CONSTRAINT [PK_Bulletin] PRIMARY KEY  CLUSTERED 
	(
		[BulletinId]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[CardContent] WITH NOCHECK ADD 
	CONSTRAINT [PK_CardContent] PRIMARY KEY  CLUSTERED 
	(
		[CardContentID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[Category] WITH NOCHECK ADD 
	CONSTRAINT [PK_Category] PRIMARY KEY  CLUSTERED 
	(
		[CategoryID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[Compic] WITH NOCHECK ADD 
	CONSTRAINT [PK_Compic] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[Config] WITH NOCHECK ADD 
	CONSTRAINT [PK_Config] PRIMARY KEY  CLUSTERED 
	(
		[ConfigID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[Currency] WITH NOCHECK ADD 
	CONSTRAINT [PK_Currency] PRIMARY KEY  CLUSTERED 
	(
		[CurrencyID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[CustomFieldItem] WITH NOCHECK ADD 
	CONSTRAINT [PK_CustomFieldItem] PRIMARY KEY  CLUSTERED 
	(
		[CustomFieldItemID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[Email] WITH NOCHECK ADD 
	CONSTRAINT [PK_Email] PRIMARY KEY  CLUSTERED 
	(
		[EmailID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[Favorite] WITH NOCHECK ADD 
	CONSTRAINT [PK_Favorite] PRIMARY KEY  CLUSTERED 
	(
		[FavoriteID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[FiltrateIP] WITH NOCHECK ADD 
	CONSTRAINT [PK_FiltrateIP] PRIMARY KEY  CLUSTERED 
	(
		[FiltrateID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[Freepro] WITH NOCHECK ADD 
	CONSTRAINT [PK_Freepro] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[Getnews] WITH NOCHECK ADD 
	CONSTRAINT [PK_Getnews] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[Link] WITH NOCHECK ADD 
	CONSTRAINT [PK_Link] PRIMARY KEY  CLUSTERED 
	(
		[LinkID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[LoginLog] WITH NOCHECK ADD 
	CONSTRAINT [PK_LoginLog] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[Member] WITH NOCHECK ADD 
	CONSTRAINT [PK_Member] PRIMARY KEY  CLUSTERED 
	(
		[MemberID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[MemberGroup] WITH NOCHECK ADD 
	CONSTRAINT [PK_MemberGroup] PRIMARY KEY  CLUSTERED 
	(
		[MemberGroupID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[MemberSerial] WITH NOCHECK ADD 
	CONSTRAINT [PK_MemberSerial] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[News_Article] WITH NOCHECK ADD 
	CONSTRAINT [PK_News_Article] PRIMARY KEY  CLUSTERED 
	(
		[ArticleID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[News_Category] WITH NOCHECK ADD 
	CONSTRAINT [PK_News_Category] PRIMARY KEY  CLUSTERED 
	(
		[CategoryID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[OrderProduct] WITH NOCHECK ADD 
	CONSTRAINT [PK_OrderProduct] PRIMARY KEY  CLUSTERED 
	(
		[OrderProductID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[OrderProductItem] WITH NOCHECK ADD 
	CONSTRAINT [PK_OrderProductItem] PRIMARY KEY  CLUSTERED 
	(
		[OrderProductItemID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[OrderReview] WITH NOCHECK ADD 
	CONSTRAINT [PK_OrderReview] PRIMARY KEY  CLUSTERED 
	(
		[OrderReviewID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[Orders] WITH NOCHECK ADD 
	CONSTRAINT [PK_Orders] PRIMARY KEY  CLUSTERED 
	(
		[OrderID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[Payment] WITH NOCHECK ADD 
	CONSTRAINT [PK_Payment] PRIMARY KEY  CLUSTERED 
	(
		[PaymentID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[Poll] WITH NOCHECK ADD 
	CONSTRAINT [PK_Poll] PRIMARY KEY  CLUSTERED 
	(
		[PollID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[Product] WITH NOCHECK ADD 
	CONSTRAINT [PK_Product] PRIMARY KEY  CLUSTERED 
	(
		[ProductID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[ProductCustomField] WITH NOCHECK ADD 
	CONSTRAINT [PK_ProductCustomField] PRIMARY KEY  CLUSTERED 
	(
		[ProductCustomFieldID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[ProductField] WITH NOCHECK ADD 
	CONSTRAINT [PK_ProductField] PRIMARY KEY  CLUSTERED 
	(
		[ProductFieldID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[Review] WITH NOCHECK ADD 
	CONSTRAINT [PK_Review] PRIMARY KEY  CLUSTERED 
	(
		[ReviewID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[ReviewFeed] WITH NOCHECK ADD 
	CONSTRAINT [PK_ReviewFeed] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[Shipping] WITH NOCHECK ADD 
	CONSTRAINT [PK_Shipping] PRIMARY KEY  CLUSTERED 
	(
		[ShippingID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[ShippingArea] WITH NOCHECK ADD 
	CONSTRAINT [PK_ShippingArea] PRIMARY KEY  CLUSTERED 
	(
		[ShippingAreaID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[ShippingExpression] WITH NOCHECK ADD 
	CONSTRAINT [PK_ShippingExpression] PRIMARY KEY  CLUSTERED 
	(
		[ShippingExpressionID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[ShippingPrice] WITH NOCHECK ADD 
	CONSTRAINT [PK_ShippingPrice] PRIMARY KEY  CLUSTERED 
	(
		[ShippingPriceID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[ShoppingCart] WITH NOCHECK ADD 
	CONSTRAINT [PK_ShoppingCart] PRIMARY KEY  CLUSTERED 
	(
		[RecordID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[ShoppingCartProductItems] WITH NOCHECK ADD 
	CONSTRAINT [PK_ShoppingCartProductItems] PRIMARY KEY  CLUSTERED 
	(
		[ItemID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[Template] WITH NOCHECK ADD 
	CONSTRAINT [PK_Template] PRIMARY KEY  CLUSTERED 
	(
		[TemplateID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[adlist] WITH NOCHECK ADD 
	CONSTRAINT [PK_adlist] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[advancePay] WITH NOCHECK ADD 
	CONSTRAINT [PK_advancePay] PRIMARY KEY  CLUSTERED 
	(
		[AdvancePaymentID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[allbuy] WITH NOCHECK ADD 
	CONSTRAINT [PK_allbuy] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[areatype] WITH NOCHECK ADD 
	CONSTRAINT [PK_areatype] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[blank] WITH NOCHECK ADD 
	CONSTRAINT [PK_blank] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[canshu] WITH NOCHECK ADD 
	CONSTRAINT [PK_canshu] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[card] WITH NOCHECK ADD 
	CONSTRAINT [PK_card] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[cardconsums] WITH NOCHECK ADD 
	CONSTRAINT [PK_cardconsums] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[directory] WITH NOCHECK ADD 
	CONSTRAINT [PK_directory] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[directoryPic] WITH NOCHECK ADD 
	CONSTRAINT [PK_directoryPic] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[djqrec] WITH NOCHECK ADD 
	CONSTRAINT [PK_djqrec] PRIMARY KEY  CLUSTERED 
	(
		[AdvancePaymentID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[game] WITH NOCHECK ADD 
	CONSTRAINT [PK_game] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[jforder] WITH NOCHECK ADD 
	CONSTRAINT [PK_jforder] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[jfrec] WITH NOCHECK ADD 
	CONSTRAINT [PK_jfrec] PRIMARY KEY  CLUSTERED 
	(
		[AdvancePaymentID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[liuyan] WITH NOCHECK ADD 
	CONSTRAINT [PK_liuyan] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[pinpai] WITH NOCHECK ADD 
	CONSTRAINT [PK_pinpai] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[proTopic] WITH NOCHECK ADD 
	CONSTRAINT [PK_proTopic] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[province] WITH NOCHECK ADD 
	CONSTRAINT [PK_province] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[score] WITH NOCHECK ADD 
	CONSTRAINT [PK_score] PRIMARY KEY  CLUSTERED 
	(
		[sid]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tb_Company] WITH NOCHECK ADD 
	CONSTRAINT [PK_tb_Company] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tb_Stock] WITH NOCHECK ADD 
	CONSTRAINT [PK_tb_Stock] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tb_order] WITH NOCHECK ADD 
	CONSTRAINT [PK_tb_order] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[tellpic] WITH NOCHECK ADD 
	CONSTRAINT [PK_tellpic] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[AD] ADD 
	CONSTRAINT [DF_AD_IsOpen] DEFAULT (0) FOR [IsOpen],
	CONSTRAINT [DF_AD_AdType] DEFAULT (0) FOR [AdType]
GO

ALTER TABLE [dbo].[Article] ADD 
	CONSTRAINT [DF_Article_lx] DEFAULT (0) FOR [lx]
GO

ALTER TABLE [dbo].[ArticleCategory] ADD 
	CONSTRAINT [DF_ArticleCategory_NewWindow] DEFAULT (0) FOR [NewWindow]
GO

ALTER TABLE [dbo].[CardContent] ADD 
	CONSTRAINT [DF_CardContent_IsSold] DEFAULT (0) FOR [IsSold]
GO

ALTER TABLE [dbo].[Category] ADD 
	CONSTRAINT [DF_Category_CanAdd] DEFAULT (0) FOR [CanAdd],
	CONSTRAINT [DF_Category_ProductPageSize] DEFAULT (0) FOR [ProductPageSize],
	CONSTRAINT [DF_Category_InBar] DEFAULT (0) FOR [InBar],
	CONSTRAINT [DF_Category_InNav] DEFAULT (0) FOR [InNav],
	CONSTRAINT [DF_Category_IsActive] DEFAULT (1) FOR [IsActive],
	CONSTRAINT [DF_Category_IsDeleted] DEFAULT (0) FOR [IsDeleted],
	CONSTRAINT [DF_Category_IsShow] DEFAULT (0) FOR [IsShow],
	CONSTRAINT [DF_Category_rx] DEFAULT (0) FOR [rx],
	CONSTRAINT [DF_Category_isml] DEFAULT (0) FOR [isml],
	CONSTRAINT [DF_Category_isdy] DEFAULT (1) FOR [isdy]
GO

ALTER TABLE [dbo].[Compic] ADD 
	CONSTRAINT [DF_Compic_addtime] DEFAULT (getdate()) FOR [addtime],
	CONSTRAINT [DF_Compic_sjid] DEFAULT (0) FOR [sjid],
	CONSTRAINT [DF_Compic_isvoid] DEFAULT (0) FOR [isvoid]
GO

ALTER TABLE [dbo].[Config] ADD 
	CONSTRAINT [DF_Config_SmtpValidate] DEFAULT (0) FOR [SmtpValidate],
	CONSTRAINT [DF_Config_ShopStop] DEFAULT (0) FOR [ShopStop],
	CONSTRAINT [DF_Config_UseCache] DEFAULT (0) FOR [UseCache],
	CONSTRAINT [DF_Config_LinkAllowApply] DEFAULT (0) FOR [LinkAllowApply],
	CONSTRAINT [DF_Config_StorageAlert] DEFAULT (0) FOR [StorageAlert],
	CONSTRAINT [DF_Config_uKeyEnabled] DEFAULT (0) FOR [uKeyEnabled],
	CONSTRAINT [DF_Config_Ls] DEFAULT (0) FOR [Ls],
	CONSTRAINT [DF_Config_dateshow] DEFAULT (0) FOR [dateshow],
	CONSTRAINT [DF_Config_zs] DEFAULT (0) FOR [zs],
	CONSTRAINT [DF_Config_iskf] DEFAULT (0) FOR [iskf],
	CONSTRAINT [DF_Config_isfs] DEFAULT (0) FOR [isfs],
	CONSTRAINT [DF_Config_iszsh] DEFAULT (0) FOR [iszsh],
	CONSTRAINT [DF_Config_ispsh] DEFAULT (0) FOR [ispsh],
	CONSTRAINT [DF_Config_iszjf] DEFAULT (0) FOR [iszjf],
	CONSTRAINT [DF_Config_iszdjq] DEFAULT (0) FOR [iszdjq],
	CONSTRAINT [DF_Config_ispjf] DEFAULT (0) FOR [ispjf],
	CONSTRAINT [DF_Config_ispdjq] DEFAULT (0) FOR [ispdjq],
	CONSTRAINT [DF_Config_istjf] DEFAULT (0) FOR [istjf],
	CONSTRAINT [DF_Config_istdjq] DEFAULT (0) FOR [istdjq],
	CONSTRAINT [DF_Config_ishs] DEFAULT (0) FOR [ishs],
	CONSTRAINT [DF_Config_istsh] DEFAULT (0) FOR [istsh],
	CONSTRAINT [DF_Config_ishyck] DEFAULT (0) FOR [ishyck],
	CONSTRAINT [DF_Config_istgjf] DEFAULT (0) FOR [istgjf],
	CONSTRAINT [DF_Config_dljf] DEFAULT (0) FOR [dljf],
	CONSTRAINT [DF_Config_yddjq] DEFAULT (0) FOR [yddjq],
	CONSTRAINT [DF_Config_picCore] DEFAULT (0) FOR [picCore],
	CONSTRAINT [DF_Config_yajhs] DEFAULT (0) FOR [yajhs],
	CONSTRAINT [DF_Config_dxto] DEFAULT (0) FOR [dxto],
	CONSTRAINT [DF_Config_swj] DEFAULT (0) FOR [swj],
	CONSTRAINT [DF_Config_xwj0] DEFAULT (0) FOR [xwj],
	CONSTRAINT [DF_Config_dxyz] DEFAULT (0) FOR [dxyz],
	CONSTRAINT [DF_Config_psf] DEFAULT (0) FOR [psf],
	CONSTRAINT [DF_Config_fl] DEFAULT (0) FOR [fl]
GO

ALTER TABLE [dbo].[Currency] ADD 
	CONSTRAINT [DF_Currency_IsDefault] DEFAULT (0) FOR [IsDefault]
GO

ALTER TABLE [dbo].[CustomFieldItem] ADD 
	CONSTRAINT [DF_CustomFieldItem_ShopProductID] DEFAULT (0) FOR [ShopProductID],
	CONSTRAINT [DF_CustomFieldItem_FieldID] DEFAULT (0) FOR [FieldID],
	CONSTRAINT [DF_CustomFieldItem_Price] DEFAULT (0) FOR [Price],
	CONSTRAINT [DF_CustomFieldItem_Selected] DEFAULT (0) FOR [Selected]
GO

ALTER TABLE [dbo].[Favorite] ADD 
	CONSTRAINT [DF_Favorite_ispl] DEFAULT (0) FOR [ispl]
GO

ALTER TABLE [dbo].[FiltrateIP] ADD 
	CONSTRAINT [DF_FiltrateIP_lx] DEFAULT (0) FOR [lx]
GO

ALTER TABLE [dbo].[Freepro] ADD 
	CONSTRAINT [DF_Freepro_lb] DEFAULT (0) FOR [lb]
GO

ALTER TABLE [dbo].[Link] ADD 
	CONSTRAINT [DF_Link_Home] DEFAULT (0) FOR [Home],
	CONSTRAINT [DF_Link_Passed] DEFAULT (0) FOR [Passed]
GO

ALTER TABLE [dbo].[LoginLog] ADD 
	CONSTRAINT [DF_LoginLog_addtime] DEFAULT (getdate()) FOR [addtime]
GO

ALTER TABLE [dbo].[Member] ADD 
	CONSTRAINT [DF_Member_HideEmail] DEFAULT (0) FOR [HideEmail],
	CONSTRAINT [DF_Member_Sex] DEFAULT (0) FOR [Sex],
	CONSTRAINT [DF_Member_djq] DEFAULT (0) FOR [djq],
	CONSTRAINT [DF_Member_isd] DEFAULT (0) FOR [isd],
	CONSTRAINT [DF_Member_ParentID] DEFAULT (0) FOR [ParentID],
	CONSTRAINT [DF_Member_Depth] DEFAULT (0) FOR [Depth],
	CONSTRAINT [DF_Member_agent] DEFAULT (0) FOR [agent],
	CONSTRAINT [DF_Member_gamecj] DEFAULT (0) FOR [gamecj],
	CONSTRAINT [DF_Member_ecs] DEFAULT (0) FOR [ecs]
GO

ALTER TABLE [dbo].[MemberGroup] ADD 
	CONSTRAINT [DF_MemberGroup_mone] DEFAULT (0) FOR [mone],
	CONSTRAINT [DF_MemberGroup_sj] DEFAULT (0) FOR [sj],
	CONSTRAINT [DF_MemberGroup_score] DEFAULT (0) FOR [score]
GO

ALTER TABLE [dbo].[MemberSerial] ADD 
	CONSTRAINT [DF_MemberSerial_isUse] DEFAULT (0) FOR [isUse]
GO

ALTER TABLE [dbo].[News_Article] ADD 
	CONSTRAINT [DF_News_Article_RootID] DEFAULT (0) FOR [RootID],
	CONSTRAINT [DF_News_Article_CategoryID] DEFAULT (0) FOR [CategoryID],
	CONSTRAINT [DF_News_Article_Hits] DEFAULT (0) FOR [Hits],
	CONSTRAINT [DF_News_Article_IsHtml] DEFAULT (0) FOR [IsHtml],
	CONSTRAINT [DF_News_Article_IsHot] DEFAULT (0) FOR [IsHot],
	CONSTRAINT [DF_News_Article_IsTop] DEFAULT (0) FOR [IsTop],
	CONSTRAINT [DF_News_Article_IsShow] DEFAULT (0) FOR [IsShow],
	CONSTRAINT [DF_News_Article_IsBest] DEFAULT (0) FOR [IsBest],
	CONSTRAINT [DF_News_Article_IsCreate] DEFAULT (0) FOR [IsCreate],
	CONSTRAINT [DF_News_Article_EssayNum] DEFAULT (0) FOR [EssayNum],
	CONSTRAINT [DF_News_Article_isFormatRed] DEFAULT (0) FOR [isFormatRed],
	CONSTRAINT [DF_News_Article_isInfo] DEFAULT (0) FOR [isInfo],
	CONSTRAINT [DF_News_Article_iscuxiao] DEFAULT (0) FOR [iscuxiao],
	CONSTRAINT [DF_News_Article_sjid] DEFAULT (0) FOR [sjid],
	CONSTRAINT [DF_News_Article_issnews] DEFAULT (0) FOR [issnews],
	CONSTRAINT [DF_News_Article_islnews] DEFAULT (0) FOR [islnews],
	CONSTRAINT [DF_News_Article_area] DEFAULT (0) FOR [area]
GO

ALTER TABLE [dbo].[News_Category] ADD 
	CONSTRAINT [DF_News_Category_ParentID] DEFAULT (0) FOR [ParentID],
	CONSTRAINT [DF_News_Category_Depth] DEFAULT (0) FOR [Depth],
	CONSTRAINT [DF_News_Category_RootID] DEFAULT (0) FOR [RootID],
	CONSTRAINT [DF_News_Category_Sort] DEFAULT (0) FOR [Sort],
	CONSTRAINT [DF_News_Category_Child] DEFAULT (0) FOR [Child],
	CONSTRAINT [DF_News_Category_IsActive] DEFAULT (0) FOR [IsActive],
	CONSTRAINT [DF_News_Category_ArticleNum] DEFAULT (0) FOR [ArticleNum],
	CONSTRAINT [DF_News_Category_IsSy] DEFAULT (0) FOR [IsSy]
GO

ALTER TABLE [dbo].[OrderProduct] ADD 
	CONSTRAINT [DF_OrderProduct_ItemsPrice] DEFAULT (0) FOR [ItemsPrice],
	CONSTRAINT [DF_OrderProduct_IsConfirmed] DEFAULT (0) FOR [IsConfirmed],
	CONSTRAINT [DF_OrderProduct_IsPayed] DEFAULT (0) FOR [IsPayed],
	CONSTRAINT [DF_OrderProduct_IsShipped] DEFAULT (0) FOR [IsShipped],
	CONSTRAINT [DF_OrderProduct_IsFinished] DEFAULT (0) FOR [IsFinished],
	CONSTRAINT [DF_OrderProduct_IsDiscount] DEFAULT (0) FOR [IsDiscount],
	CONSTRAINT [DF_OrderProduct_istg] DEFAULT (0) FOR [istg],
	CONSTRAINT [DF_OrderProduct_cylx] DEFAULT (0) FOR [cylx]
GO

ALTER TABLE [dbo].[OrderProductItem] ADD 
	CONSTRAINT [DF_OrderProductItem_OrderProductID] DEFAULT (0) FOR [OrderProductID],
	CONSTRAINT [DF_OrderProductItem_Quantity] DEFAULT (0) FOR [Quantity],
	CONSTRAINT [DF_OrderProductItem_FieldItemID] DEFAULT (0) FOR [FieldItemID],
	CONSTRAINT [DF_OrderProductItem_ItemPrice] DEFAULT (0) FOR [ItemPrice]
GO

ALTER TABLE [dbo].[OrderReview] ADD 
	CONSTRAINT [DF_OrderReview_isyd] DEFAULT (0) FOR [isyd],
	CONSTRAINT [DF_OrderReview_sjid] DEFAULT (0) FOR [sjid]
GO

ALTER TABLE [dbo].[Orders] ADD 
	CONSTRAINT [DF_Orders_CustomItemPrice] DEFAULT (0) FOR [CustomItemPrice],
	CONSTRAINT [DF_Orders_NeedInvoice] DEFAULT (0) FOR [NeedInvoice],
	CONSTRAINT [DF_Orders_IsCancelled] DEFAULT (0) FOR [IsCancelled],
	CONSTRAINT [DF_Orders_IsConfirmed] DEFAULT (0) FOR [IsConfirmed],
	CONSTRAINT [DF_Orders_IsFinished] DEFAULT (0) FOR [IsFinished],
	CONSTRAINT [DF_Orders_LastModify] DEFAULT (0) FOR [LastModify],
	CONSTRAINT [DF_Orders_istc] DEFAULT (0) FOR [istc],
	CONSTRAINT [DF_Orders_dxdjq] DEFAULT (0) FOR [dxdjq],
	CONSTRAINT [DF_Orders_realprice] DEFAULT (0) FOR [realprice],
	CONSTRAINT [DF_Orders_dcode] DEFAULT (0) FOR [dcode],
	CONSTRAINT [DF_Orders_isyd] DEFAULT (0) FOR [isyd],
	CONSTRAINT [DF_Orders_sjid] DEFAULT (0) FOR [sjid],
	CONSTRAINT [DF_Orders_istg] DEFAULT (0) FOR [istg],
	CONSTRAINT [DF_Orders_cylx] DEFAULT (0) FOR [cylx],
	CONSTRAINT [DF_Orders_psf] DEFAULT (0) FOR [psf],
	CONSTRAINT [DF_Orders_ordertype] DEFAULT (0) FOR [ordertype]
GO

ALTER TABLE [dbo].[Payment] ADD 
	CONSTRAINT [DF_Payment_lx] DEFAULT (0) FOR [lx]
GO

ALTER TABLE [dbo].[Poll] ADD 
	CONSTRAINT [DF_Poll_Multiple] DEFAULT (0) FOR [Multiple],
	CONSTRAINT [DF_Poll_inIndex] DEFAULT (0) FOR [inIndex]
GO

ALTER TABLE [dbo].[Product] ADD 
	CONSTRAINT [DF_Product_Unit] DEFAULT (0) FOR [Unit],
	CONSTRAINT [DF_Product_IsForSale] DEFAULT (0) FOR [IsForSale],
	CONSTRAINT [DF_Product_IsCommend] DEFAULT (0) FOR [IsCommend],
	CONSTRAINT [DF_Product_IsHot] DEFAULT (0) FOR [IsHot],
	CONSTRAINT [DF_Product_IsSpecialOffer] DEFAULT (0) FOR [IsSpecialOffer],
	CONSTRAINT [DF_Product_IsVirtual] DEFAULT (0) FOR [IsVirtual],
	CONSTRAINT [DF_Product_CanReview] DEFAULT (0) FOR [CanReview],
	CONSTRAINT [DF_Product_IsDiscount] DEFAULT (0) FOR [IsDiscount],
	CONSTRAINT [DF_Product_Hits] DEFAULT (0) FOR [Hits],
	CONSTRAINT [DF_Product_Min] DEFAULT (0) FOR [Min],
	CONSTRAINT [DF_Product_sellnum] DEFAULT (0) FOR [sellnum],
	CONSTRAINT [DF_Product_stj] DEFAULT (0) FOR [stj],
	CONSTRAINT [DF_Product_srecom] DEFAULT (0) FOR [srecom],
	CONSTRAINT [DF_Product_syh] DEFAULT (0) FOR [syh],
	CONSTRAINT [DF_Product_yhq] DEFAULT (0) FOR [yhq],
	CONSTRAINT [DF_Product_yxdjq] DEFAULT (0) FOR [yxdjq],
	CONSTRAINT [DF_Product_yxsl] DEFAULT (0) FOR [yxsl],
	CONSTRAINT [DF_Product_Zsprice] DEFAULT (0) FOR [Zsprice],
	CONSTRAINT [DF_Product_sjid] DEFAULT (0) FOR [sjid],
	CONSTRAINT [DF_Product_isyf] DEFAULT (0) FOR [isyf]
GO

ALTER TABLE [dbo].[ProductCustomField] ADD 
	CONSTRAINT [DF_ProductCustomField_Multiple] DEFAULT (0) FOR [Multiple],
	CONSTRAINT [DF_ProductCustomField_Countable] DEFAULT (0) FOR [Countable],
	CONSTRAINT [DF_ProductCustomField_ItemNum] DEFAULT (0) FOR [ItemNum]
GO

ALTER TABLE [dbo].[ProductField] ADD 
	CONSTRAINT [DF_ProductField_AddToAdvSearch] DEFAULT (0) FOR [AddToAdvSearch],
	CONSTRAINT [DF_ProductField_IsMultiple] DEFAULT (0) FOR [IsMultiple],
	CONSTRAINT [DF_ProductField_isRadio] DEFAULT (0) FOR [isRadio],
	CONSTRAINT [DF_ProductField_lx] DEFAULT (0) FOR [lx]
GO

ALTER TABLE [dbo].[Review] ADD 
	CONSTRAINT [DF_Review_HideEmail] DEFAULT (0) FOR [HideEmail],
	CONSTRAINT [DF_Review_Status] DEFAULT (0) FOR [Status],
	CONSTRAINT [DF_Review_Score] DEFAULT (0) FOR [Score],
	CONSTRAINT [DF_Review_ispl] DEFAULT (0) FOR [ispl],
	CONSTRAINT [DF_Review_hid] DEFAULT (0) FOR [hid],
	CONSTRAINT [DF_Review_rjxf] DEFAULT (0) FOR [rjxf],
	CONSTRAINT [DF_Review_pjxz] DEFAULT (0) FOR [pjxz],
	CONSTRAINT [DF_Review_zhichi] DEFAULT (0) FOR [zhichi],
	CONSTRAINT [DF_Review_fandui] DEFAULT (0) FOR [fandui],
	CONSTRAINT [DF_Review_gid] DEFAULT (0) FOR [gid],
	CONSTRAINT [DF_Review_xid] DEFAULT (0) FOR [xid]
GO

ALTER TABLE [dbo].[ReviewFeed] ADD 
	CONSTRAINT [DF_ReviewFeed_addtime] DEFAULT (getdate()) FOR [addtime],
	CONSTRAINT [DF_ReviewFeed_pjxz] DEFAULT (0) FOR [pjxz]
GO

ALTER TABLE [dbo].[ShippingArea] ADD 
	CONSTRAINT [DF_ShippingArea_isfx] DEFAULT (0) FOR [isfx]
GO

ALTER TABLE [dbo].[ShoppingCart] ADD 
	CONSTRAINT [DF_ShoppingCart_Quantity] DEFAULT (0) FOR [Quantity],
	CONSTRAINT [DF_ShoppingCart_istg] DEFAULT (0) FOR [istg],
	CONSTRAINT [DF_ShoppingCart_sylx] DEFAULT (0) FOR [cylx],
	CONSTRAINT [DF_ShoppingCart_sjid] DEFAULT (0) FOR [sjid]
GO

ALTER TABLE [dbo].[ShoppingCartProductItems] ADD 
	CONSTRAINT [DF_ShoppingCartProductItems_RecordID] DEFAULT (0) FOR [RecordID],
	CONSTRAINT [DF_ShoppingCartProductItems_Quantity] DEFAULT (0) FOR [Quantity],
	CONSTRAINT [DF_ShoppingCartProductItems_FieldItemID] DEFAULT (0) FOR [FieldItemID]
GO

ALTER TABLE [dbo].[Template] ADD 
	CONSTRAINT [DF_Template_qb] DEFAULT (0) FOR [qb]
GO

ALTER TABLE [dbo].[adlist] ADD 
	CONSTRAINT [DF_adlist_dx] DEFAULT (0) FOR [dx],
	CONSTRAINT [DF_adlist_sjid] DEFAULT (0) FOR [sjid]
GO

ALTER TABLE [dbo].[advancePay] ADD 
	CONSTRAINT [DF_advancePay_type] DEFAULT (0) FOR [type],
	CONSTRAINT [DF_advancePay_issucess] DEFAULT (0) FOR [issucess]
GO

ALTER TABLE [dbo].[allbuy] ADD 
	CONSTRAINT [DF_allbuy_zt] DEFAULT (0) FOR [zt],
	CONSTRAINT [DF_allbuy_zprice] DEFAULT (0) FOR [zprice],
	CONSTRAINT [DF_allbuy_proid] DEFAULT (0) FOR [proid]
GO

ALTER TABLE [dbo].[areatype] ADD 
	CONSTRAINT [DF_areatype_lx] DEFAULT (0) FOR [lx],
	CONSTRAINT [DF_areatype_sjid] DEFAULT (0) FOR [sjid]
GO

ALTER TABLE [dbo].[canshu] ADD 
	CONSTRAINT [DF_canshu_tj] DEFAULT (0) FOR [tj]
GO

ALTER TABLE [dbo].[card] ADD 
	CONSTRAINT [DF_card_tclx] DEFAULT (0) FOR [tclx],
	CONSTRAINT [DF_card_price] DEFAULT (0) FOR [price],
	CONSTRAINT [DF_card_cshu] DEFAULT (0) FOR [cshu],
	CONSTRAINT [DF_card_isyx] DEFAULT (0) FOR [isyx],
	CONSTRAINT [DF_card_iszc] DEFAULT (0) FOR [iszc],
	CONSTRAINT [DF_card_isfs] DEFAULT (0) FOR [isfs],
	CONSTRAINT [DF_card_xfcs] DEFAULT (0) FOR [xfcs],
	CONSTRAINT [DF_card_zccs] DEFAULT (0) FOR [zccs]
GO

ALTER TABLE [dbo].[cardconsums] ADD 
	CONSTRAINT [DF_cardconsums_carid] DEFAULT (0) FOR [carid],
	CONSTRAINT [DF_cardconsums_cshu] DEFAULT (0) FOR [cshu]
GO

ALTER TABLE [dbo].[directory] ADD 
	CONSTRAINT [DF_directory_addtime] DEFAULT (getdate()) FOR [addtime]
GO

ALTER TABLE [dbo].[directoryPic] ADD 
	CONSTRAINT [DF_directoryPic_addtime] DEFAULT (getdate()) FOR [addtime],
	CONSTRAINT [DF_directoryPic_isRcom] DEFAULT (0) FOR [isRcom]
GO

ALTER TABLE [dbo].[game] ADD 
	CONSTRAINT [DF_game_click] DEFAULT (0) FOR [click],
	CONSTRAINT [DF_game_addtime] DEFAULT (getdate()) FOR [addtime],
	CONSTRAINT [DF_game_gamecode] DEFAULT (0) FOR [gamecode],
	CONSTRAINT [DF_game_ty] DEFAULT (0) FOR [tj]
GO

ALTER TABLE [dbo].[jforder] ADD 
	CONSTRAINT [DF_jforder_bz] DEFAULT (0) FOR [bz]
GO

ALTER TABLE [dbo].[pinpai] ADD 
	CONSTRAINT [DF_pinpai_tj] DEFAULT (0) FOR [tj],
	CONSTRAINT [DF_pinpai_rs] DEFAULT (0) FOR [rs]
GO

ALTER TABLE [dbo].[proTopic] ADD 
	CONSTRAINT [DF_proTopic_ismb] DEFAULT (0) FOR [ismb],
	CONSTRAINT [DF_proTopic_addtime] DEFAULT (getdate()) FOR [addtime],
	CONSTRAINT [DF_proTopic_jies] DEFAULT (0) FOR [jies],
	CONSTRAINT [DF_proTopic_istp] DEFAULT (0) FOR [istp],
	CONSTRAINT [DF_proTopic_iswz] DEFAULT (0) FOR [iswz]
GO

ALTER TABLE [dbo].[score] ADD 
	CONSTRAINT [DF_score_score] DEFAULT (0) FOR [score],
	CONSTRAINT [DF_score_gamecode] DEFAULT (0) FOR [gamecode],
	CONSTRAINT [DF_score_stime] DEFAULT (getdate()) FOR [stime],
	CONSTRAINT [DF_score_ub] DEFAULT (0) FOR [ub]
GO

ALTER TABLE [dbo].[tb_Company] ADD 
	CONSTRAINT [DF_tb_Company_Postalcode] DEFAULT (0) FOR [Postalcode],
	CONSTRAINT [DF_tb_Company_sheng] DEFAULT (0) FOR [sheng],
	CONSTRAINT [DF_tb_Company_shi] DEFAULT (0) FOR [shi],
	CONSTRAINT [DF_tb_Company_djq] DEFAULT (0) FOR [djq],
	CONSTRAINT [DF_tb_Company_isvoid] DEFAULT (0) FOR [isvoid],
	CONSTRAINT [DF_tb_Company_isdiccount] DEFAULT (0) FOR [isdiscount],
	CONSTRAINT [DF_tb_Company_disnum] DEFAULT (0) FOR [disnum],
	CONSTRAINT [DF_tb_Company_sellnum] DEFAULT (0) FOR [sellnum],
	CONSTRAINT [DF_tb_Company_wei] DEFAULT (0) FOR [wei],
	CONSTRAINT [DF_tb_Company_zheng] DEFAULT (0) FOR [zheng],
	CONSTRAINT [DF_tb_Company_isclose] DEFAULT (0) FOR [isclose],
	CONSTRAINT [DF_tb_Company_Hits] DEFAULT (0) FOR [Hits],
	CONSTRAINT [DF_tb_Company_kw] DEFAULT (0) FOR [kw],
	CONSTRAINT [DF_tb_Company_hj] DEFAULT (0) FOR [hj],
	CONSTRAINT [DF_tb_Company_fw] DEFAULT (0) FOR [fw],
	CONSTRAINT [DF_tb_Company_sd] DEFAULT (0) FOR [sd],
	CONSTRAINT [DF_tb_Company_reviewnum] DEFAULT (0) FOR [reviewnum],
	CONSTRAINT [DF_tb_Company_IsCommend] DEFAULT (0) FOR [IsCommend],
	CONSTRAINT [DF_tb_Company_stj] DEFAULT (0) FOR [stj],
	CONSTRAINT [DF_tb_Company_ispp] DEFAULT (0) FOR [ispp],
	CONSTRAINT [DF_tb_Company_istg] DEFAULT (0) FOR [istg],
	CONSTRAINT [DF_tb_Company_sylx] DEFAULT (0) FOR [sylx],
	CONSTRAINT [DF_tb_Company_istop] DEFAULT (0) FOR [istop],
	CONSTRAINT [DF_tb_Company_templete] DEFAULT (0) FOR [templete],
	CONSTRAINT [DF_tb_Company_iscz] DEFAULT (0) FOR [iscz],
	CONSTRAINT [DF_tb_Company_years] DEFAULT (0) FOR [years],
	CONSTRAINT [DF_tb_Company_isad] DEFAULT (0) FOR [isad],
	CONSTRAINT [DF_tb_Company_ishf] DEFAULT (0) FOR [ishf]
GO

ALTER TABLE [dbo].[tb_Stock] ADD 
	CONSTRAINT [DF_tb_Stock_fkzt] DEFAULT (0) FOR [fkzt],
	CONSTRAINT [DF_tb_Stock_jszt] DEFAULT (0) FOR [jszt]
GO

ALTER TABLE [dbo].[tb_order] ADD 
	CONSTRAINT [DF_tb_order_fkzt] DEFAULT (0) FOR [fkzt],
	CONSTRAINT [DF_tb_order_jszt] DEFAULT (0) FOR [jszt]
GO

SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS OFF 
GO

CREATE proc p_backupdb
@dbname sysname='',   --要备份的数据库名称,不指定则备份当前数据库
@bkpath nvarchar(260)='', --备份文件的存放目录,不指定则使用SQL默认的备份目录
@bkfname nvarchar(260)='', --备份文件名,文件名中可以用\DBNAME\代表数据库名,\DATE\代表日期,\TIME\代表时间
@bktype nvarchar(10)='DB', --备份类型:'DB'备份数据库,'DF' 差异备份,'LOG' 日志备份
@appendfile bit=1   --追加/覆盖备份文件
as
 declare @sql varchar(8000)
 if isnull(@dbname,'')='' set @dbname=db_name()
 if isnull(@bkfname,'')='' set @bkfname='\DBNAME\_\DATE\_\TIME\.BAK'
 set @bkfname=replace(replace(replace(@bkfname,'\DBNAME\',@dbname)
  ,'\DATE\',convert(varchar,getdate(),112))
  ,'\TIME\',replace(convert(varchar,getdate(),108),':',''))
 set @sql='backup '+case @bktype when 'LOG' then 'log ' else 'database ' end +@dbname
  +' to disk='''+@bkpath+@bkfname
  +''' with '+case @bktype when 'DF' then 'DIFFERENTIAL,' else '' end
  +case @appendfile when 1 then 'NOINIT' else 'INIT' end
 exec(@sql)
GO
SET QUOTED_IDENTIFIER OFF 
GO
SET ANSI_NULLS ON 
GO

