BOOK
NO |
TITLE |
AUTHOR |
PUBLISH |
PUB_DATE |
PRICE |
100001 |
ORACLE 9I 数据库系统管理 |
李代平 |
冶金工业出版社 |
2003-01-01 |
38 |
100002 |
ORACLE 9I 数据库系统管理 |
李代平 |
冶金工业出版社 |
2003-01-01 |
35 |
100003 |
ORACLE 9I 数据库系统管理 |
李代平 |
冶金工业出版社 |
2003-01-01 |
49 |
100004 |
ORACLE 9I 数据库系统管理 |
李代平 |
冶金工业出版社 |
2003-01-01 |
34 |
100005 |
ORACLE 9I 数据库系统管理 |
李代平 |
冶金工业出版社 |
2003-01-01 |
21 |
100006 |
ORACLE 9I 数据库系统管理 |
李代平 |
冶金工业出版社 |
2003-01-01 |
38 |
READER
RNO |
RNAME |
200001 |
张三 |
200002 |
张三 |
200003 |
张三 |
200004 |
张三 |
200005 |
张三 |
BORROW
NO |
RNO |
BORROW_DATE |
100001 |
200001 |
2004-08-10··10:06:14 |
100002 |
200002 |
2004-08-10··10:06:14 |
100003 |
200003 |
2004-08-10··10:06:14 |
100004 |
200004 |
2004-08-10··10:06:14 |
100005 |
200005 |
2004-08-10··10:06:14 |
create table book(
no number(10) primary key,
title varchar(20),
author varchar(10),
publish varchar(20),
to_date date,
price number(5)
)tablespace users;
alter table book modify(no number(10));
INSERT INTO BOOK VALUES(100001,'冶金工业出版社','李代平','冶金工业出版社',TO_DATE('2003-01-01','YYYY-MM-DD'),38);
INSERT INTO BOOK VALUES(100002,'冶金工业出版社','李代平','冶金工业出版社',TO_DATE('2003-01-01','YYYY-MM-DD'),38);
INSERT INTO BOOK VALUES(100003,'冶金工业出版社','李代平','冶金工业出版社',TO_DATE('2003-01-01','YYYY-MM-DD'),38);
INSERT INTO BOOK VALUES(100004,'冶金工业出版社','李代平','冶金工业出版社',TO_DATE('2003-01-01','YYYY-MM-DD'),38);
INSERT INTO BOOK VALUES(100005,'冶金工业出版社','李代平','冶金工业出版社',TO_DATE('2003-01-01','YYYY-MM-DD'),38);
INSERT INTO BOOK VALUES(100006,'冶金工业出版社','李代平','冶金工业出版社',TO_DATE('2003-01-01','YYYY-MM-DD'),38);
create table reader(
rno number(10) primary key,
rname varchar(10)
)tablespace users;
INSERT INTO reader values(200001,'张三');
INSERT INTO READER VALUES(200002,'李凤');
INSERT INTO READER VALUES(200003,'孟欣');
INSERT INTO READER VALUES(200004,'谢非');
INSERT INTO READER VALUES(200005,'刘英');
create table borrow(
no number(10) references book(no),
rno number(10) references reader(rno),
borrow_dare date
)tablespace users;
INSERT INTO BORROW VALUES(100001,200001,TO_DATE('2004-08-10 10:06:14',to_char('YYYY-MM-DD HH:MI:SS')));
INSERT INTO BORROW VALUES(100002,200002,TO_DATE('2004-08-10 10:06:27',to_char('YYYY-MM-DD HH:MI:SS')));
INSERT INTO BORROW VALUES(100003,200003,TO_DATE('2004-08-10 10:06:36',to_char('YYYY-MM-DD HH:MI:SS')));
INSERT INTO BORROW VALUES(100004,200004,TO_DATE('2004-08-10 10:06:48',to_char('YYYY-MM-DD HH:MI:SS')));
INSERT INTO BORROW VALUES(100005,200005,TO_DATE('2004-08-10 10:06:58',to_char('YYYY-MM-DD HH:MI:SS')));
INSERT into BOOK values(100007,'Java 网络编程','李程','电子工业出版社',TO_DATE('2000-08-01','YYYY-MM-DD'),35);
update book set price = 29 where no = 100007;
delete from book where no = 100007;