| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 716 人关注过本帖
标题:借书、还书的触发器怎么写?
取消只看楼主 加入收藏
boyzone
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2010-11-12
结帖率:100%
收藏
已结贴  问题点数:20 回复次数:0 
借书、还书的触发器怎么写?
create table BOOKINFO
(
   BOOKNO               varchar(20)                    not null,
   BOO_BOOKTYPENO       varchar(10)                    not null,
   BOOKNAME             varchar(50)                    not null,
   BOOKAUTHOR           varchar(20)                    not null,
   BOOKINDATE           date                           not null,
   BOOKISBN             varchar(15)                    not null,
   BOOKPRICE            numeric(50),
   constraint PK_BOOKINFO primary key (BOOKNO)
);

create table BOOKTYPE
(
   BOOKTYPENO           varchar(10)                    not null,
   BOOKTYPENAME         varchar(50)                    not null,
   constraint PK_BOOKTYPE primary key (BOOKTYPENO)
);

create table BORROW_RETURNINFO
(
   REA_READNO           varchar(15)                    not null,
   BOO_BOOKNO           varchar(20)                    not null,
   BORROWDATE           date,
   RETURNDATE           date,
   constraint PK_BORROW_RETURNINFO primary key clustered (REA_READNO, BOO_BOOKNO)
);

create table BUYBOOK
(
   PUB_PUBLISHNO        varchar(10)                    not null,
   BOO_BOOKNO           varchar(20)                    not null,
   QUANTITY             numeric(50),
   constraint PK_BUYBOOK primary key clustered (PUB_PUBLISHNO, BOO_BOOKNO)
);

create table PUBLISHINFO
(
   PUBLISHNO            varchar(10)                    not null,
   PUBLISHNAME          varchar(50)                    not null,
   PUBLISHADDRE         varchar(50),
   PUBLISHZIPCODE       varchar(7),
   PUBLISHPHONE         varchar(11),
   constraint PK_PUBLISHINFO primary key (PUBLISHNO)
);

create table READINFO
(
   READNO               varchar(15)                    not null,
   REA_READTYPENO       varchar(10)                    not null,
   READNAME             varchar(30)                    not null,
   READSEX              varchar(4),
   READDATE             date,
   READPHONE            varchar(11),
   READCONDITION        varchar(4),
   constraint PK_READINFO primary key (READNO)
);

create table READTYPE
(
   READTYPENO           varchar(10)                    not null,
   READTYPENAME         varchar(50)                    not null,
   BOOKNUMBER           numeric,
   BOOKDAY              numeric,
   constraint PK_READTYPE primary key (READTYPENO)
);
图片附件: 游客没有浏览图片的权限,请 登录注册
搜索更多相关主题的帖子: 触发器 
2010-12-22 11:19
快速回复:借书、还书的触发器怎么写?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.019042 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved