日期:2014-05-17 浏览次数:20842 次
create table users ( userid number not null primary key, username varchar2(20) not null unique, userpwd varchar2(60) not null ) create table diary_group ( dgerid number not null primary key, dgname varchar2(20) not null , userid varchar2(20) --外键引用user表的主键 ) create table diary ( diaryid number not null primary key, diarytitle varchar2(20) not null unique, diary clob not null, dgid number --外键引用diary_group表的主键 )
SELECT * FROM (SELECT A. * , ROWNUM RN FROM ( ... --这里面写三张表联立SQL ... ) A ORDER BY 排序字段 DESC ) WHERE RN > 0 and RN < 11
------解决方案--------------------