?????????????????Oracle?е?????????????
????Oracle?е????????????????????????Σ??????????????Σ?????????2???????????ROWID???б????????ROWNUM???к??????????????DESCRIBE??????????????????????????е?????????????????????????????????????????????????????α?У?pseudo column????
??????????????????????Щ???????????????????
?????????
????create table users(id integer primary key??name nvarchar2(20))
?????????????
????insert into users(id??name) values(1??'tom');insert into users(id??name) values(2??'cat');insert into users(id??name) values(3??'bob');insert into users(id??name) values(4??'anxpp');insert into users(id??name) values(5??'ez');insert into users(id??name) values(6??'lily');
???????describe??????????

?????????????????н????????????Ρ?
?????????????????????????α?е????
????select rowid??rownum??id??name from users;
?????????

???????rowid????????ò?????Oracle????????????????洢?е?????λ????????18λ???????????base-64????
?????????rownum?????????????????????з???????????????????????е??к??
?????????????????????????????????????е?????п??????????????????????????檔
???????????????????????????????????2??????????2???????????1?????????????е??к??(???-1)*??????+1=3??????е??к?????*??????=4????
????select * from users where rownum>=3 rownum <= 4;
??????????????????????κν???????????Oracle??????????????????????????к??1????????>=3???????????????б????????????б???μ????У???????к????д??????????????????????????????????????У????????????????????????????鯔??????
?????????????????????????????????????????к????????????????????????????????????У?????к?????????趨?????????????????????????????д?????????????
????select id??name from(       select rownum rn??u.* from users u) ua where ua.rn between 3 and 4;
???????????仹?????????>=???????????<=??????????????????????н??????????????????????????????????????SQL???£?
????select id??name from(       select rownum rn??u.* from users u where rownum<=4) ua where ua.rn >= 3;
?????????

??????????????????????????????????????????????ε?????????????????? order by ????????????????????? order by ?????????rownum?????????
????select rownum??id??name from users order by name;
?????????

???????????????????к???????????????????????????к????????? order by ?????????????к??
????????????????????????飬?????????ú??????£??????????????????????????????????????????????????sql???£?
????select id??name from(       (select rownum rn??uo.* from              (select * from users u order by name) uo       where rownum<=4)) uawhere ua.rn>=3;
????????????????????????????????id?2??5???????????

????OK??????????
?????????????????????????????????????????????????????????д???????SQL???????дSQL?????????????????????SQL??????????????
??????????Oracle?е?SQL???????????????????????????????????????Oracle????????.