输入正确的日期格式可以用下面两个方法: 1、SQL> alter session set NLS_DATE_FORMAT='yyyy/mm/dd'; 2、SQL> insert into BookCopies values (0201501139,1,'Y',to_date('09-13-2006','MM-DD-YYYY')); ---------------------------------------------------------------- SQL> select title, price from book; TITLE PRICE -------------------- ---------- database management 20 c++ programming 27 thinking in Java 35 database management 42 visual basic 37 network economics 40 已选择6行。 SQL> select author from book where title='thinking in Java'; AUTHOR ---------- Patric SQL> select * from book where price<40; BNO TITLE AUTHOR PRESS PRICE ---- -------------------- ---------- -------------------- ---------- 1 database management Peter China Machine Press 20 2 c++ programming Johnson tianjin uni Press 27 3 thinking in Java Patric tsinghua uni Press 35 5 visual basic Martin tianjin uni Press 37 SQL> select title from book where price= 2 (select max(price) from book); TITLE -------------------- database management SQL> select count(distinct(rno)) from borrow; COUNT(DISTINCT(RNO)) -------------------- 3 SQL> select Rno from Borrow 2 group by Rno 3 having COUNT(*) >= ALL( 4 select COUNT(*) from Borrow 5 group by Rno); RNO ---- 1002 1003 SQL> select Press,count(Press) from Book 2 group by Press ; PRESS COUNT(PRESS) -------------------- ------------ tianjin uni Press 2 tsinghua uni Press 2 China Machine Press 2 SQL> select Title from Book where Price>=all(select price from book); TITLE -------------------- database management SQL>