SQL> select name,bdate from reader,borrow,book where 2 reader.rno=borrow.rno and borrow.bno=book.bno and book.title='database management'; NAME BDATE ---------- -------------- qian 02-11月-04 zhou 02-5月 -04 SQL> select rno from borrow where bno in (select bno from book where title='thinking in Java'); RNO ---- 1002 SQL> select name from reader where rno in (select rno from borrow where bno in (select bno from book where title='thinking in Java')); NAME ---------- qian SQL> select name,bdate,title from reader,borrow,book where reader.rno=borrow.rno and borrow.bno= 2 book.bno and name='zheng' and bdate>'01-1月-06'; 未选定行 SQL> select 'zhangsan',count(*) from borrow,reader where borrow.rno=reader.rno and reader.name='zhangsan'; 'ZHANGSA COUNT(*) -------- ---------- zhangsan 0 或用分组也可以,分组属性用reader.rno还是用name含义不同。 SQL> select '1003',sum(price) from borrow,book where borrow.bno=book.bno and borrow.rno='1003'; '100 SUM(PRICE) ---- ---------- 1003 64 SQL>