SQl1建表

--初始化表结构,以下是删除存储过程
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sp_Contract_Account_Change]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[sp_Contract_Account_Change]
GO

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sp_System_Del_All_Auth]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[sp_System_Del_All_Auth]
GO
--存储过程结束
--建立LmXs表
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[LmXs]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[LmXs]
GO
CREATE TABLE [LmXs]
(
 [ID] [Int] IDENTITY (1,1) PRIMARY KEY CLUSTERED  NOT NULL ,
 [NavName] [varchar](50) NULL,
 [NavLink] [varchar](80) NULL,
 [NavMode] [varchar](10) NULL,
 [NavDel] [bit] NULL,
) ON [PRIMARY]
GO

--建立TzClass表
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[TzClass]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[TzClass]
GO
CREATE TABLE [TzClass]
(
 [Newid] [Int] IDENTITY (1,1) PRIMARY KEY CLUSTERED  NOT NULL ,
 [TzId] [varchar] (3) NULL ,
 [TzLx] [varchar] (20) NULL ,
 [TzBm] [varchar] (10) NULL ,
 [TzDel] [bit] NULL ,
        [TzDate] [datetime] default (getdate()) NULL ,
) ON [PRIMARY]
GO

--建立SkIn表
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[SkIn]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[SkIn]
GO
CREATE TABLE [SkIn]
(
 [Id] [Int] IDENTITY (1,1) PRIMARY KEY CLUSTERED  NOT NULL ,
 [SkinId] [varchar] (6) NULL ,
 [SkinName] [varchar] (50) NULL ,
 [SkinTxt] [text] NULL ,
 [SkinDel] [bit] default (0) NULL ,
        [SkinSj] [datetime] default (getdate()) NULL ,
) ON [PRIMARY]
GO

--建立BbsNews表
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[BbsNews]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[BbsNews]
GO
CREATE TABLE [BbsNews]
(
 [Id] [Int] IDENTITY (1,1) PRIMARY KEY CLUSTERED  NOT NULL ,
 [NewsBt] [varchar] (50) NULL ,
 [NewsFbl] [varchar] (30) NULL ,
 [NewsNr] [text] NULL ,
 [NewsDel] [bit] default (0) NULL ,
        [NewsDate] [datetime] default (getdate()) NULL ,
) ON [PRIMARY]
GO

--建立BbsInfo表
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[BbsInfo]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[BbsInfo]
GO
CREATE TABLE [BbsInfo]
(
 [Id] [Int] IDENTITY (1,1) PRIMARY KEY CLUSTERED  NOT NULL ,
 [BoardID] [Int]  NULL ,
 [WtBt] [varchar] (200) NULL ,
 [ZzXm] [varchar] (30) NULL ,
 [ZzBm] [varchar] (15) NULL ,
        [Jh] [bit] default (0) NULL ,
    [ReplyNum] [int] default (0)  NULL ,
        [HitSnum] [int] default (0) NULL ,
 [Parent] [int]  default (0) NULL ,
        [WtNr] [text] NULL ,
 [WtFjPath] [varchar] (50) NULL ,
        [ZzXq] [varchar] (50) NULL ,
 [FbDate] [datetime] default (getdate()) NULL ,
        [IpAddress] [varchar] (20) NULL ,
 [BbsTop] [bit] default (0) NULL ,
 [jt] [bit] default (0) NULL ,
 [Del] [bit] default (0) NULL ,
) ON [PRIMARY]
GO

--建立Friend表
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Friend]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Friend]
GO
CREATE TABLE [Friend]
(
 [Newid] [Int] IDENTITY (1,1) PRIMARY KEY CLUSTERED  NOT NULL ,
 [Username] [varchar] (20) NULL ,
 [Friend] [varchar] (20) NULL ,
 [FrEmail] [varchar] (30) NULL ,
 [FrYdTx] [varchar] (20) NULL ,
        [FrDh] [varchar] (20) NULL ,
 [Tablename] [varchar] (20) NULL ,
        [Sj] [datetime]  NULL ,
) ON [PRIMARY]
GO

--建立BbsMessage表
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[BbsMessage]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[BbsMessage]
GO
CREATE TABLE [BbsMessage]
(
 [Newid] [Int] IDENTITY (1,1) PRIMARY KEY CLUSTERED  NOT NULL ,
 [FjR] [varchar] (20) NULL ,
 [SjR] [varchar] (20) NULL ,
 [DxBt] [varchar] (60) NULL ,
 [DxNr] [text] NULL ,
        [FjDate] [datetime] NULL ,
 [SjDate] [datetime] NULL ,
        [Flag] [varchar] (3)  NULL ,
        [DelS] [varchar] (3)  NULL ,
        [DelF] [varchar] (3)  NULL ,
        [Ipaddress] [varchar] (30)  NULL ,
) ON [PRIMARY]
GO

--建立JobInfo表
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[JobInfo]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[JobInfo]
GO
CREATE TABLE [JobInfo]
(
 [ID] [Int] IDENTITY (1,1) PRIMARY KEY CLUSTERED  NOT NULL ,
 [PostNum] [varchar] (5) NULL ,
 [PostName] [varchar] (20) NULL ,
 [Postlb] [varchar] (2) NULL ,
) ON [PRIMARY]
GO

--建立YgInfo表
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[YgInfo]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[YgInfo]
GO
CREATE TABLE [YgInfo]
(
 [Id] [Int] IDENTITY (1,1)  NOT NULL ,
 [YgGh] [varchar] (6) PRIMARY KEY CLUSTERED NOT NULL ,
 [YgXm] [varchar] (12) NOT NULL ,
 [YgBm] [varchar] (20) NULL ,
 [YgPw] [varchar] (36) NULL ,
        [SoftQx] [varchar] (120) NULL ,
    [ModeQx] [varchar] (300)  NULL ,
        [YgDd] [varchar] (20) NULL ,
 [YdTx] [varchar] (50) NULL ,
        [BgDh] [varchar] (60) NULL ,
 [ZzDh] [varchar] (30) NULL ,
        [YgPost] [varchar] (20) NULL ,
 [YgBusy] [varchar] (20) NULL ,
        [EMail] [varchar] (60) NULL ,
 [Bx] [varchar] (10) NULL ,
 [Del] [bit] NULL ,
 [FbDate] [datetime] NULL ,
 [CgDate] [datetime] NULL ,
 [Skin] [varchar] (6) NULL ,
        [UserId] [varchar] (7) NULL ,
) ON [PRIMARY]
GO

--建立GroupInfo表
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[GroupInfo]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[GroupInfo]
GO
CREATE TABLE [GroupInfo]
(
 [ID] [Int] IDENTITY (1,1) PRIMARY KEY CLUSTERED  NOT NULL ,
 [GroupNum] [varchar] (5) NULL ,
 [GroupName] [varchar] (20) NULL ,
 [GroupSet] [varchar] (600) NULL ,
 [GroupLb] [varchar] (3) NULL ,
) ON [PRIMARY]
GO

--建立SoftName表
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[SoftName]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[SoftName]
GO
CREATE TABLE [SoftName]
(
 [ID] [Int] IDENTITY (1,1) PRIMARY KEY CLUSTERED  NOT NULL ,
 [SoftNum] [varchar] (6) NULL ,
 [SoftClass] [varchar] (50) NULL ,
) ON [PRIMARY]
GO


--建立BbsBoard表
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[BbsBoard]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[BbsBoard]
GO
CREATE TABLE [BbsBoard]
(
 [Id] [Int] IDENTITY (1,1) PRIMARY KEY CLUSTERED NOT NULL ,
 [ParentId] [int] default (0) NULL ,
 [Path] [varchar] (50) NULL ,
 [Tclass] [int] default (0) NULL ,
 [Child] [int] default (0) NULL ,
 [Tgroup] [int] default (0) NULL ,
 [ConTent] [varchar] (100) NULL ,
 [ReadMe] [text] NULL ,
        [BbsImg] [varchar] (50) NULL ,
    [BbMaster] [varchar] (50)  NULL ,
) ON [PRIMARY]
GO

--建立ZnGl表
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[ZnGl]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[ZnGl]
GO
CREATE TABLE [ZnGl]
(
 [Id] [Int] IDENTITY (1,1) PRIMARY KEY CLUSTERED NOT NULL ,
 [EIP_Tilte] [varchar] (100) NULL ,
 [EIP_Lr] [text] NULL ,
 [EIP_Date] [datetime] default (getdate()) NULL ,
 [Del] [bit] default (0) NULL ,
) ON [PRIMARY]
GO

--建立JsClass表
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[JsClass]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[JsClass]
GO
CREATE TABLE [JsClass]
(
 [Id] [Int] IDENTITY (1,1) PRIMARY KEY CLUSTERED NOT NULL ,
 [ClassName] [varchar] (30) NULL ,
 [ClassTjR]  [varchar] (20) NULL ,
 [ClassDate] [datetime] default (getdate()) NULL ,
) ON [PRIMARY]
GO

--建立JsInfo表
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[JsInfo]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[JsInfo]
GO
CREATE TABLE [JsInfo]
(
 [Id] [Int] IDENTITY (1,1) PRIMARY KEY CLUSTERED NOT NULL ,
 [ClassID] [int] NULL ,
 [NewBt] [varchar] (100) NULL ,
 [NewLr] [text] NULL ,
 [NewCz] [varchar] (50) NULL ,
 [NewTjR] [varchar] (20) NULL ,
 [NewDate] [datetime] default (getdate()) NULL ,
 [Del] [bit] default (0) NULL ,
) ON [PRIMARY]
GO

--建立Gstz表
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Gstz]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Gstz]
GO
CREATE TABLE [Gstz]
(
 [Id] [Int] IDENTITY (1,1) PRIMARY KEY CLUSTERED NOT NULL ,
 [TzTitle] [varchar] (100) NULL ,
 [TzLx] [int] NULL ,
 [TzFw] [int] NULL ,
 [TzNum] [varchar] (10) NULL ,
 [TzHj] [varchar] (100) NULL ,
 [FjName] [varchar] (160) NULL ,
        [TzNl] [text] NULL ,
    [Tzl] [varchar] (20)  NULL ,
    [TzBm] [varchar] (20)  NULL ,
    [TzSj] [datetime] NULL ,
    [BrowseNum] [int]  NULL ,
    [Del] [bit]  NULL ,
) ON [PRIMARY]
GO

--建立EIpBook表
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[EIpBook]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[EIpBook]
GO
CREATE TABLE [EIpBook]
(
 [Id] [Int] IDENTITY (1,1) PRIMARY KEY CLUSTERED NOT NULL ,
 [Tille] [varchar] (50) NULL,
 [Lx] [varchar] (50) NULL,
 [Lxr] [varchar] (50) NULL,
 [Email] [varchar] (50) NULL,
 [Phone] [varchar] (20) NULL,
        [Nr] [text] NULL ,
    [Sj] [datetime] NULL,
    [Hf] [text] NULL ,
    [CIP] [varchar] (50) NULL,
) ON [PRIMARY]
GO

--建立XgXx表
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[XgXx]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[XgXx]
GO
CREATE TABLE [XgXx]
(
 [Id] [Int] IDENTITY (1,1) PRIMARY KEY CLUSTERED NOT NULL ,
 [XgName] [varchar] (50) NULL,
 [LxXgUrl] [varchar] (50) NULL,
 [XgClass] [varchar] (50) NULL,
 [XgClassid] [int] NULL,
 [XgSj] [datetime] NULL,
) ON [PRIMARY]
GO

--建立XgClass表
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[XgClass]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[XgClass]
GO
CREATE TABLE [XgClass]
(
 [Id] [Int] IDENTITY (1,1) PRIMARY KEY CLUSTERED NOT NULL ,
 [Class] [varchar] (50) NULL,
) ON [PRIMARY]
GO

--建立NavLr表
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[NavLr]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[NavLr]
GO
CREATE TABLE [NavLr]
(
 [Id] [Int] IDENTITY (1,1) PRIMARY KEY CLUSTERED NOT NULL ,
 [EIP_Title] [varchar] (100) NULL,
 [EIP_Lr] [text] NULL,
 [EIP_Nav] [varchar] (20) NULL,
 [EIP_Date] [datetime] default(getdate()) NULL,
 [EIP_Del] [bit] default (0) NULL,
) ON [PRIMARY]
GO

--建立Pwfw表
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Pwfw]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Pwfw]
GO
CREATE TABLE [Pwfw]
(
 [Newid] [Int] IDENTITY (1,1) PRIMARY KEY CLUSTERED NOT NULL ,
 [Fws] [varchar] (200) NULL,
 [Lxr] [varchar] (60) NULL,
 [Dh] [varchar] (200) NULL,
 [Cz] [varchar] (200) NULL,
 [Sp] [varchar] (50) NULL,
        [Dd] [varchar] (50) NULL,
        [Dz] [varchar] (600) NULL,
        [Bz] [varchar] (600) NULL,
 [Sj] [datetime] NULL,
 [Del] [bit]  NULL,
) ON [PRIMARY]
GO

--建立Khxx表
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Khxx]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Khxx]
GO
CREATE TABLE [Khxx]
(
 [Newid] [Int] IDENTITY (1,1) PRIMARY KEY CLUSTERED NOT NULL ,
 [Jdmc] [varchar] (200) NULL,
 [Xj] [varchar] (200) NULL,
 [Dh] [varchar] (200) NULL,
 [Lxr] [varchar] (200) NULL,
 [Dd] [varchar] (200) NULL,
        [Dz] [varchar] (800) NULL,
        [Jg] [varchar] (200) NULL,
        [Zk] [varchar] (200) NULL,
        [Cclx] [varchar] (200) NULL,
        [Jbl] [varchar] (200) NULL,
 [Sj] [datetime] NULL,
 [Del] [bit]  NULL,
) ON [PRIMARY]
GO

--建立Nav表
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Nav]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Nav]
GO
CREATE TABLE [Nav]
(
 [Id] [Int] IDENTITY (1,1) PRIMARY KEY CLUSTERED NOT NULL ,
 [EIP_Name] [varchar] (50) NULL,
 [EIP_Sort] [int] NULL,
 [EIP_Child] [bit] default (0) NULL,
 [EIP_Path] [varchar] (20) NULL,
 [EIP_Lr] [text] NULL,
) ON [PRIMARY]
GO


--初始化数据

/* 用户表 */
insert into YgInfo(YgGh,YgXm,YgBm,YgPw,SoftQx,ModeQx,YgDd,YgPost,YgBusy,Bx,Del,FbDate,CgDate,Skin,UserId) values('Admin','系统管理员','AA','7fef61712c0559f88b377245469e80d3','11,12,13,14,15,16,17','01A,02A,03A,04A,05A,06A,07A,11B,12B,13B,21C,31D,32D,41E,42E,43E,44E,51F,52F,61G,71H,72H,73H,74H,75H,81I,91J,','福州','系统管理员','系统管理员','是','0',getdate(),getdate(),'001','000001')

/* 栏目表 */

insert into LmXs(NavName,NavLink,NavMode,NavDel) values('公司动态','GsDt/GsDt.asp','_self','0')
insert into LmXs(NavName,NavLink,NavMode,NavDel) values('出行参考','CxCk/CxCk.asp','_self','0')
insert into LmXs(NavName,NavLink,NavMode,NavDel) values('员工通讯','YgTx/YgTx.asp','_self','0')
insert into LmXs(NavName,NavLink,NavMode,NavDel) values('网上培训','Wspx/Wspx.asp','_self','0')
insert into LmXs(NavName,NavLink,NavMode,NavDel) values('质量管理','ZnGl/ZnGl.asp','_self','0')
insert into LmXs(NavName,NavLink,NavMode,NavDel) values('在线反馈','ZxFk/ZxFk.asp','_self','0')
insert into LmXs(NavName,NavLink,NavMode,NavDel) values('产品发布','../Member/CpInfo/CpGl.asp','_blank','0')
insert into LmXs(NavName,NavLink,NavMode,NavDel) values('员工论坛','bbs/bbs.asp','_blank','0')

/* SKIN表 */

insert into SkIn(SkinId,SkinName,SkinTxt,SkinSj,SkinDel) values('001','默认设置','友好、和协、商业化',getdate(),'0')
insert into SkIn(SkinId,SkinName,SkinTxt,SkinSj,SkinDel) values('002','黄金时代','黄金时代',getdate(),'0')
insert into SkIn(SkinId,SkinName,SkinTxt,SkinSj,SkinDel) values('003','春意盎然','其他',getdate(),'0')
insert into SkIn(SkinId,SkinName,SkinTxt,SkinSj,SkinDel) values('004','红红夜思','其他',getdate(),'0')

 

posted on 2004-06-08 11:03  乔本生涯a  阅读(633)  评论(0编辑  收藏  举报

导航