进销存数据库SQL SERVER生成脚本
合集下载
相关主题
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
GO
/****** 对象: Table [dbo].[tb_kucun] 脚本日期: 04/13/2011 13:16:06 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[tb_kucun](
[xsdate] [datetime] NOT NULL,
[czy] [varchar](30) NOT NULL,
[jsr] [varchar](30) NOT NULL,
[jsfs] [varchar](10) NOT NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
[spname] [varchar](50) NOT NULL,
[gg] [varchar](50) NOT NULL,
[dj] [money] NOT NULL,
[sl] [int] NOT NULL,
[je] [money] NULL,
[gysname] [varchar](100) NOT NULL,
[spid] [varchar](50) NOT NULL,
[gg] [varchar](50) NOT NULL,
[dj] [money] NOT NULL,
[sl] [float] NOT NULL,
[je] [float] NULL,
[khname] [varchar](100) NOT NULL,
[jsr] [varchar](30) NOT NULL,
[jsfs] [varchar](10) NOT NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** 对象: Table [dbo].[v_sellView] 脚本日期: 04/13/2011 13:16:30 ******/
[spid] [varchar](50) NOT NULL,
[id] [varchar](30) NOT NULL,
[spname] [varchar](50) NOT NULL,
[jc] [varchar](25) NULL,
[cd] [varchar](50) NULL,
[gg] [varchar](50) NULL,
[bz] [varchar](50) NULL,
USE [db_jjj]
GO
/****** 对象: Table [dbo].[tb_xsth_detail] 脚本日期: 04/13/2011 13:16:20 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
[rtdate] [datetime] NOT NULL,
[czy] [varchar](30) NOT NULL,
[jsr] [varchar](30) NOT NULL,
[jsfs] [varchar](10) NOT NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
[jsr] [varchar](30) NOT NULL,
[jsfs] [varchar](10) NOT NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** 对象: Table [dbo].[tb_gysinfo] 脚本日期: 04/13/2011 13:16:01 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[tb_har](50) NOT NULL,
[khname] [varchar](50) NULL,
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[tb_rkth_detail](
[id] [int] NOT NULL,
[rkthID] [varchar](30) NOT NULL,
[ltel] [varchar](50) NULL,
[mail] [varchar](50) NULL,
[xinhang] [varchar](60) NULL,
[hao] [varchar](60) NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[tb_gysinfo](
[id] [varchar](50) NOT NULL,
[name] [varchar](60) NULL,
[dj] [money] NOT NULL,
[sl] [int] NOT NULL,
[je] [money] NULL,
[khname] [varchar](100) NOT NULL,
[thdate] [datetime] NOT NULL,
[czy] [varchar](30) NOT NULL,
CREATE TABLE [dbo].[v_xsthView](
[xsthID] [varchar](30) NOT NULL,
[spid] [varchar](50) NOT NULL,
[spname] [varchar](50) NOT NULL,
[gg] [varchar](50) NOT NULL,
[jc] [varchar](50) NULL,
[address] [varchar](100) NULL,
[bianma] [varchar](50) NULL,
[tel] [varchar](50) NULL,
[fax] [varchar](50) NULL,
[lian] [varchar](50) NULL,
[dw] [varchar](10) NULL,
[dj] [money] NULL,
[kcsl] [int] NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** 对象: Table [dbo].[tb_rkth_detail] 脚本日期: 04/13/2011 13:16:07 ******/
CREATE TABLE [dbo].[v_rukuView](
[rkID] [varchar](30) NOT NULL,
[spid] [varchar](50) NOT NULL,
[spname] [varchar](50) NOT NULL,
[gg] [varchar](50) NOT NULL,
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[v_rkthView](
[rkthID] [varchar](30) NOT NULL,
[spid] [varchar](50) NOT NULL,
GO
/****** 对象: Table [dbo].[v_rukuView] 脚本日期: 04/13/2011 13:16:27 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
GO
CREATE TABLE [dbo].[tb_xsth_detail](
[id] [int] NOT NULL,
[xsthID] [varchar](30) NOT NULL,
[spid] [varchar](50) NOT NULL,
[dj] [money] NOT NULL,
[dj] [money] NOT NULL,
[sl] [int] NOT NULL,
[je] [money] NULL,
[gysname] [varchar](100) NULL,
[rkdate] [datetime] NOT NULL,
[czy] [varchar](30) NOT NULL,
[jsfs] [varchar](10) NOT NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** 对象: Table [dbo].[v_rkthView] 脚本日期: 04/13/2011 13:16:24 ******/
SET ANSI_NULLS ON
[jian] [varchar](50) NULL,
[address] [varchar](100) NULL,
[bianma] [varchar](50) NULL,
[tel] [varchar](50) NULL,
[fax] [varchar](50) NULL,
[lian] [varchar](50) NULL,
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[tb_xsth_main](
[xsthID] [varchar](30) NOT NULL,
[pzs] [int] NOT NULL,
[je] [money] NOT NULL,
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[v_sellView](
[sellID] [varchar](30) NOT NULL,
[spname] [varchar](50) NOT NULL,
[ysjl] [varchar](50) NULL,
[khname] [varchar](100) NOT NULL,
[thdate] [datetime] NOT NULL,
[czy] [varchar](30) NOT NULL,
[jsr] [varchar](30) NOT NULL,
GO
/****** 对象: Table [dbo].[v_xsthView] 脚本日期: 04/13/2011 13:16:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
[sl] [int] NOT NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** 对象: Table [dbo].[tb_xsth_main] 脚本日期: 04/13/2011 13:16:22 ******/
SET ANSI_NULLS ON
[ltel] [varchar](50) NULL,
[yh] [varchar](50) NULL,
[mail] [varchar](50) NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** 对象: Table [dbo].[tb_khinfo] 脚本日期: 04/13/2011 13:16:04 ******/
/****** 对象: Table [dbo].[tb_kucun] 脚本日期: 04/13/2011 13:16:06 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[tb_kucun](
[xsdate] [datetime] NOT NULL,
[czy] [varchar](30) NOT NULL,
[jsr] [varchar](30) NOT NULL,
[jsfs] [varchar](10) NOT NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
[spname] [varchar](50) NOT NULL,
[gg] [varchar](50) NOT NULL,
[dj] [money] NOT NULL,
[sl] [int] NOT NULL,
[je] [money] NULL,
[gysname] [varchar](100) NOT NULL,
[spid] [varchar](50) NOT NULL,
[gg] [varchar](50) NOT NULL,
[dj] [money] NOT NULL,
[sl] [float] NOT NULL,
[je] [float] NULL,
[khname] [varchar](100) NOT NULL,
[jsr] [varchar](30) NOT NULL,
[jsfs] [varchar](10) NOT NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** 对象: Table [dbo].[v_sellView] 脚本日期: 04/13/2011 13:16:30 ******/
[spid] [varchar](50) NOT NULL,
[id] [varchar](30) NOT NULL,
[spname] [varchar](50) NOT NULL,
[jc] [varchar](25) NULL,
[cd] [varchar](50) NULL,
[gg] [varchar](50) NULL,
[bz] [varchar](50) NULL,
USE [db_jjj]
GO
/****** 对象: Table [dbo].[tb_xsth_detail] 脚本日期: 04/13/2011 13:16:20 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
[rtdate] [datetime] NOT NULL,
[czy] [varchar](30) NOT NULL,
[jsr] [varchar](30) NOT NULL,
[jsfs] [varchar](10) NOT NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
[jsr] [varchar](30) NOT NULL,
[jsfs] [varchar](10) NOT NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** 对象: Table [dbo].[tb_gysinfo] 脚本日期: 04/13/2011 13:16:01 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[tb_har](50) NOT NULL,
[khname] [varchar](50) NULL,
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[tb_rkth_detail](
[id] [int] NOT NULL,
[rkthID] [varchar](30) NOT NULL,
[ltel] [varchar](50) NULL,
[mail] [varchar](50) NULL,
[xinhang] [varchar](60) NULL,
[hao] [varchar](60) NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[tb_gysinfo](
[id] [varchar](50) NOT NULL,
[name] [varchar](60) NULL,
[dj] [money] NOT NULL,
[sl] [int] NOT NULL,
[je] [money] NULL,
[khname] [varchar](100) NOT NULL,
[thdate] [datetime] NOT NULL,
[czy] [varchar](30) NOT NULL,
CREATE TABLE [dbo].[v_xsthView](
[xsthID] [varchar](30) NOT NULL,
[spid] [varchar](50) NOT NULL,
[spname] [varchar](50) NOT NULL,
[gg] [varchar](50) NOT NULL,
[jc] [varchar](50) NULL,
[address] [varchar](100) NULL,
[bianma] [varchar](50) NULL,
[tel] [varchar](50) NULL,
[fax] [varchar](50) NULL,
[lian] [varchar](50) NULL,
[dw] [varchar](10) NULL,
[dj] [money] NULL,
[kcsl] [int] NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** 对象: Table [dbo].[tb_rkth_detail] 脚本日期: 04/13/2011 13:16:07 ******/
CREATE TABLE [dbo].[v_rukuView](
[rkID] [varchar](30) NOT NULL,
[spid] [varchar](50) NOT NULL,
[spname] [varchar](50) NOT NULL,
[gg] [varchar](50) NOT NULL,
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[v_rkthView](
[rkthID] [varchar](30) NOT NULL,
[spid] [varchar](50) NOT NULL,
GO
/****** 对象: Table [dbo].[v_rukuView] 脚本日期: 04/13/2011 13:16:27 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
GO
CREATE TABLE [dbo].[tb_xsth_detail](
[id] [int] NOT NULL,
[xsthID] [varchar](30) NOT NULL,
[spid] [varchar](50) NOT NULL,
[dj] [money] NOT NULL,
[dj] [money] NOT NULL,
[sl] [int] NOT NULL,
[je] [money] NULL,
[gysname] [varchar](100) NULL,
[rkdate] [datetime] NOT NULL,
[czy] [varchar](30) NOT NULL,
[jsfs] [varchar](10) NOT NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** 对象: Table [dbo].[v_rkthView] 脚本日期: 04/13/2011 13:16:24 ******/
SET ANSI_NULLS ON
[jian] [varchar](50) NULL,
[address] [varchar](100) NULL,
[bianma] [varchar](50) NULL,
[tel] [varchar](50) NULL,
[fax] [varchar](50) NULL,
[lian] [varchar](50) NULL,
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[tb_xsth_main](
[xsthID] [varchar](30) NOT NULL,
[pzs] [int] NOT NULL,
[je] [money] NOT NULL,
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[v_sellView](
[sellID] [varchar](30) NOT NULL,
[spname] [varchar](50) NOT NULL,
[ysjl] [varchar](50) NULL,
[khname] [varchar](100) NOT NULL,
[thdate] [datetime] NOT NULL,
[czy] [varchar](30) NOT NULL,
[jsr] [varchar](30) NOT NULL,
GO
/****** 对象: Table [dbo].[v_xsthView] 脚本日期: 04/13/2011 13:16:32 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
[sl] [int] NOT NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** 对象: Table [dbo].[tb_xsth_main] 脚本日期: 04/13/2011 13:16:22 ******/
SET ANSI_NULLS ON
[ltel] [varchar](50) NULL,
[yh] [varchar](50) NULL,
[mail] [varchar](50) NULL
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
/****** 对象: Table [dbo].[tb_khinfo] 脚本日期: 04/13/2011 13:16:04 ******/