⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hms2000.sql

📁 很好用的酒店管理软件
💻 SQL
📖 第 1 页 / 共 5 页
字号:
   drop table DBA.ydpf
go


if exists (select 1
            from  sysobjects
           where  id = object_id('DBA.yg')
            and   type = 'U')
   drop table DBA.yg
go


if exists (select 1
            from  sysobjects
           where  id = object_id('DBA.yhzc')
            and   type = 'U')
   drop table DBA.yhzc
go


if exists (select 1
            from  sysobjects
           where  id = object_id('DBA.ystj')
            and   type = 'U')
   drop table DBA.ystj
go


if exists (select 1
            from  sysobjects
           where  id = object_id('DBA.zd')
            and   type = 'U')
   drop table DBA.zd
go


if exists (select 1
            from  sysobjects
           where  id = object_id('DBA.zh')
            and   type = 'U')
   drop table DBA.zh
go


if exists (select 1
            from  sysobjects
           where  id = object_id('DBA.zj')
            and   type = 'U')
   drop table DBA.zj
go


if exists (select 1
            from  sysobjects
           where  id = object_id('DBA.zkd')
            and   type = 'U')
   drop table DBA.zkd
go


if exists (select 1
            from  sysobjects
           where  id = object_id('DBA.zlxhb')
            and   type = 'U')
   drop table DBA.zlxhb
go


if exists (select 1
            from  sysobjects
           where  id = object_id('DBA.zm')
            and   type = 'U')
   drop table DBA.zm
go


if exists (select 1
            from  sysobjects
           where  id = object_id('DBA.zmzy')
            and   type = 'U')
   drop table DBA.zmzy
go


if exists (select 1
            from  sysobjects
           where  id = object_id('DBA.zw_bbdy1')
            and   type = 'U')
   drop table DBA.zw_bbdy1
go


if exists (select 1
            from  sysobjects
           where  id = object_id('DBA.zw_bbdy2')
            and   type = 'U')
   drop table DBA.zw_bbdy2
go


if exists (select 1
            from  sysobjects
           where  id = object_id('DBA.zw_czy')
            and   type = 'U')
   drop table DBA.zw_czy
go


if exists (select 1
            from  sysobjects
           where  id = object_id('DBA.zw_fl')
            and   type = 'U')
   drop table DBA.zw_fl
go


if exists (select 1
            from  sysobjects
           where  id = object_id('DBA.zw_gxzy')
            and   type = 'U')
   drop table DBA.zw_gxzy
go


if exists (select 1
            from  sysobjects
           where  id = object_id('DBA.zw_km')
            and   type = 'U')
   drop table DBA.zw_km
go


if exists (select 1
            from  sysobjects
           where  id = object_id('DBA.zw_km_s')
            and   type = 'U')
   drop table DBA.zw_km_s
go


if exists (select 1
            from  sysobjects
           where  id = object_id('DBA.zw_mxz')
            and   type = 'U')
   drop table DBA.zw_mxz
go


if exists (select 1
            from  sysobjects
           where  id = object_id('DBA.zw_pbb1')
            and   type = 'U')
   drop table DBA.zw_pbb1
go


if exists (select 1
            from  sysobjects
           where  id = object_id('DBA.zw_pbb2')
            and   type = 'U')
   drop table DBA.zw_pbb2
go


if exists (select 1
            from  sysobjects
           where  id = object_id('DBA.zw_pzh')
            and   type = 'U')
   drop table DBA.zw_pzh
go


if exists (select 1
            from  sysobjects
           where  id = object_id('DBA.zw_syb')
            and   type = 'U')
   drop table DBA.zw_syb
go


if exists (select 1
            from  sysobjects
           where  id = object_id('DBA.zw_wb')
            and   type = 'U')
   drop table DBA.zw_wb
go


if exists (select 1
            from  sysobjects
           where  id = object_id('DBA.zw_zcfzb')
            and   type = 'U')
   drop table DBA.zw_zcfzb
go


if exists (select 1
            from  sysobjects
           where  id = object_id('DBA.zw_zs')
            and   type = 'U')
   drop table DBA.zw_zs
go


if exists (select 1
            from  sysobjects
           where  id = object_id('DBA.zw_zy')
            and   type = 'U')
   drop table DBA.zw_zy
go


if exists (select 1
            from  sysobjects
           where  id = object_id('DBA.zw_zz')
            and   type = 'U')
   drop table DBA.zw_zz
go


if exists (select 1
            from  sysobjects
           where  id = object_id('DBA.zw_zzfl')
            and   type = 'U')
   drop table DBA.zw_zzfl
go


if exists (select 1
            from  sysobjects
           where  id = object_id('DBA.zw_zzpzh')
            and   type = 'U')
   drop table DBA.zw_zzpzh
go


if exists (select 1
            from  sysobjects
           where  id = object_id('DBA.zzd')
            and   type = 'U')
   drop table DBA.zzd
go


/*==============================================================*/
/* Table: aj                                                    */
/*==============================================================*/
create table DBA.aj (
zh                   varchar(12)          not null,
money                numeric(8,2)         null,
isjs                 varchar(1)           null,
idate                timestamp            null,
itime                varchar(8)           null,
sjno                 varchar(10)          not null,
opno                 varchar(4)           not null,
bzlb                 varchar(1)           null,
xyklb                numeric(2)           null,
ws                   numeric(2)           null,
name                 varchar(10)          null,
bz                   char(16)             null,
isjz                 char(1)              null,
iszz                 char(1)              null,
sydh                 integer              null,
hm                   char(16)             null,
lsh                  numeric(12)          null,
constraint PK_AJ primary key  (sjno)
)
go


/*==============================================================*/
/* Table: bmdj                                                  */
/*==============================================================*/
create table DBA.bmdj (
xh                   integer              not null,
bm                   char(16)             not null,
lxr                  char(16)             not null,
zw                   char(16)             not null,
lxdh                 char(16)             not null,
cz                   char(16)             not null,
constraint PK_BMDJ primary key  (xh, bm, lxr, zw, lxdh, cz)
)
go


/*==============================================================*/
/* Table: bzcdwh                                                */
/*==============================================================*/
create table DBA.bzcdwh (
dm                   char(10)             not null,
wzbz                 char(200)            null,
slbz                 char(200)            null,
constraint PK_BZCDWH primary key  (dm)
)
go


/*==============================================================*/
/* Table: bzhun                                                 */
/*==============================================================*/
create table DBA.bzhun (
xh                   integer              not null,
no                   integer              not null,
bz                   char(10)             null,
constraint PK_BZHUN primary key  (xh)
)
go


/*==============================================================*/
/* Table: caid                                                  */
/*==============================================================*/
create table DBA.caid (
xh                   integer              not null,
mc                   char(40)             not null,
jg                   numeric(8,2)         not null,
lb                   char(20)             not null,
constraint PK_CAID primary key  (xh, mc, jg, lb)
)
go


/*==============================================================*/
/* Table: cdlb                                                  */
/*==============================================================*/
create table DBA.cdlb (
lb                   varchar(1)           not null,
iskc                 varchar(1)           not null,
name                 varchar(10)          not null,
iszk                 varchar(1)           not null,
isxt                 varchar(1)           not null,
constraint PK_CDLB primary key  (lb)
)
go


/*==============================================================*/
/* Table: cfpdjl                                                */
/*==============================================================*/
create table DBA.cfpdjl (
sydh                 integer              not null,
jsr                  char(8)              not null,
opno                 char(4)              not null,
je                   numeric(12,2)        not null,
rq                   timestamp            not null,
mxbh                 integer              null,
constraint PK_CFPDJL primary key  (sydh, rq)
)
go


/*==============================================================*/
/* Table: chyu                                                  */
/*==============================================================*/
create table DBA.chyu (
no                   integer              not null,
address              char(20)             null,
constraint PK_CHYU primary key  (no)
)
go


/*==============================================================*/
/* Table: ct_fk                                                 */
/*==============================================================*/
create table DBA.ct_fk (
sydh                 integer              not null,
flwno                integer              not null,
ord                  integer              not null,
idate                timestamp            not null,
type                 varchar(10)          null,
qdno                 varchar(12)          null,
vip                  varchar(10)          null,
xfhm                 varchar(10)          null,
opno                 varchar(4)           null,
jzje                 numeric(10,2)        null
)
go


/*==============================================================*/
/* Table: ct_jg                                                 */
/*==============================================================*/
create table DBA.ct_jg (
sydh                 integer              not null,
dm                   varchar(4)           not null,
je                   numeric(12,2)        null,
price                numeric(19,4)        null,
constraint PK_CT_JG primary key  (dm)
)
go


/*==============================================================*/
/* Table: ct_jsr                                                */
/*==============================================================*/
create table DBA.ct_jsr (
bh                   integer              not null,
xm                   char(8)              null,
sydh                 integer              not null,
constraint PK_CT_JSR primary key  (bh, sydh)
)
go


/*==============================================================*/
/* Table: ct_yd                                                 */
/*==============================================================*/
create table DBA.ct_yd (
xm                   char(10)             not null,
rs                   integer              null,
ddrq                 timestamp            null,
ydwz                 integer              not null,
lxdh                 char(10)             null,
lxdz                 char(20)             null,
bz                   char(20)             null,
dj                   numeric(18,2)        null,
ydbz                 char(1)              null,
sydh                 integer              null,
constraint PK_CT_YD primary key  (xm, ydwz)
)
go


/*==============================================================*/
/* Table: ct_yyd                                                */
/*==============================================================*/
create table DBA.ct_yyd (
flwno                integer              not null,
adress               varchar(40)          null,
tel                  varchar(20)          null,
idate                timestamp            null,
name1                varchar(30)          null,
cb                   varchar(4)           null,
lb                   varchar(1)           null,
zs                   integer              null,
rs                   integer              null,
bz                   numeric(19,4)        null,
gateday              timestamp            null,
beizu                varchar(40)          null,
dm                   integer              null,
constraint PK_CT_YYD primary key  (flwno)
)
go


/*==============================================================*/
/* Table: ct_zzc                                                */
/*==============================================================*/
create table DBA.ct_zzc (
lsh                  integer              not null,
cjzs                 integer              not null,
sydh                 integer              null,
rq                   timestamp            not null,
czy                  varchar(10)          not null,
constraint PK_CT_ZZC primary key  (lsh)
)
go


/*==============================================================*/
/* Table: ctbzcd                                                */
/*==============================================================*/
create table DBA.ctbzcd (
flwno                integer              not null,
dm                   varchar(10)          not null,
sl                   numeric(8,2)         not null,
jg                   numeric(10,2)        not null,
sydh                 integer              not null,
fwf                  numeric(19,4)        null,
constraint PK_CTBZCD primary key  (flwno, dm, sydh)
)
go


/*==============================================================*/
/* Table: ctbzcd_name                                           */
/*==============================================================*/
create table DBA.ctbzcd_name (
name                 varchar(20)          not null,
lsh                  integer              not null,
constraint PK_CTBZCD_NAME primary key  (lsh)
)
go


/*==============================================================*/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -