datetime,primary key(CNO,BNO)); 2. 找出借书超过5本的读者,输出借书卡号及所借图书册数。 Select CNO,number=count(*) from BORROW group by CNO having count(*)>5; 3. 查询借阅了"水浒"一书的读者,输出姓名及班级。 Select NAME,CLASS from CARD c where exist (select * from BORROW b1,BOOK b2 where b1.BN
oracl 和db2 常用语法比较: 1、取前N条记录 Oracle:Select * from TableName where rownum <= N; DB2:Select * from TableName fetch first N rows only; 2、取得系统日期 Oracle:Select sysdate from dual; DB2:Select current timestamp from sysibm.sysdummy1; 3、空值转换 Oracle:Select