【文章內容簡介】
= object_id(39。病人39。) and name = 39。繳費_FK39。 and indid 0 and indid 255) drop index goif exists (select 1 from sysindexes where id = object_id(39。病人39。) and name = 39。醫(yī)治_FK39。 and indid 0 and indid 255) drop index goif exists (select 1 from sysobjects where id = object_id(39。病人39。) and type = 39。U39。) drop table 病人goif exists (select 1 from sysobjects where id = object_id(39??剖?9。) and type = 39。U39。) drop table 科室goif exists (select 1 from sysindexes where id = object_id(39。藥品信息39。) and name = 39。屬于_藥品類型_FK39。 and indid 0 and indid 255) drop index goif exists (select 1 from sysobjects where id = object_id(39。藥品信息39。) and type = 39。U39。) drop table 藥品信息goif exists (select 1 from sysobjects where id = object_id(39。藥品庫存39。) and type = 39。U39。) drop table 藥品庫存goif exists (select 1 from sysindexes where id = object_id(39。藥品種類39。) and name = 39。包括_FK39。 and indid 0 and indid 255) drop index goif exists (select 1 from sysindexes where id = object_id(39。藥品種類39。) and name = 39。包括_FK39。 and indid 0 and indid 255) drop index goif exists (select 1 from sysobjects where id = object_id(39。藥品種類39。) and type = 39。U39。) drop table 藥品種類goif exists (select 1 from sysobjects where id = object_id(39。藥品類型39。) and type = 39。U39。) drop table 藥品類型goif exists (select 1 from sysindexes where id = object_id(39。配藥單39。) and name = 39。包括_FK39。 and indid 0 and indid 255) drop index goif exists (select 1 from sysindexes where id = object_id(39。配藥單39。) and name = 39。領取_配藥單_FK39。 and indid 0 and indid 255) drop index goif exists (select 1 from sysindexes where id = object_id(39。配藥單39。) and name = 39。配藥_FK39。 and indid 0 and indid 255) drop index goif exists (select 1 from sysobjects where id = object_id(39。配藥單39。) and type = 39。U39。) drop table 配藥單go/*==============================================================*//* Table: 醫(yī)生 *//*==============================================================*/create table 醫(yī)生( 醫(yī)生編號 varchar(5) not null, 科室編號 varchar(10) not null, 姓名 varchar(5) null, 性別 char(2) null, 年齡 varchar(3) null, 電話 char(11) null, constraint PK_醫(yī)生primary key nonclustered (醫(yī)生編號))go/*==============================================================*//* Index: 屬于_FK *//*==============================================================*/create index 屬于_FK on 醫(yī)生(科室編號ASC)go/*==============================================================*//* Table: 處方表 *//*==============================================================*/create table 處方表( 處方編號 varchar(10) not null, 病人編號 varchar(10) null, 醫(yī)生編號 varchar(5) null, 藥品編號 varchar(20) null, 處方時間 varchar(10) null, 備注 varchar(10) null, constraint PK_處方表primary key nonclustered (處方編號))go/*==============================================================*//* Index: 開處方_FK *//*==============================================================*/create index 開處方_FK on 處方表(醫(yī)生編號ASC)go/*==============================================================*//* Index: 領取_處方_FK *//*==============================================================*/create index 領取_處方_FK on 處方表(病人編號ASC)go/*==============================================================*//* Index: 包括_FK *//*==============================================================*/create index 包括_FK on 處方表(藥品編號ASC)go/*==============================================================*//* Table: 收費員 *//*==============================================================*/create table 收費員( 收費員編號 varchar(10) not null, 收費員姓名 varchar(10) null, constraint PK_收費員primary key nonclustered (收費員編號))go/*==============================================================*//* Table: 查看_藥品信息 *//*==============================================================*/create table 查看_藥品信息( 收費員編號 varchar(10) not null, 藥品編號 varchar(20) not null, constraint PK_查看_藥品信息primary key (收費員編號, 藥品編號))go/*==============================================================*//* Index: 查看_藥品信息_FK