java - How does Oracle obtain the next piece of data in a deduplication result set?
为情所困
为情所困 2017-05-17 10:04:31
0
4
551

This is the query result in the oracle database:

SELECT DISTINCT(KS_ZKZ) FROM ZK.T_BYSQ_KS_KC ORDER BY KS_ZKZ ASC


I can now get a list of exam numbers:


Each student ID is a hyperlink connected to the detailed information of this student ID;

Now how can I jump to the next student number page by clicking the button on the detailed content page? For example, after I get the first student ID, how can I get the second student ID together?

为情所困
为情所困

reply all(4)
仅有的幸福

If you think about it carefully if you are working in Java or C#, list and details are two pages. The List data taken in the list function is released after the page rendering is completed, and cannot be used on the details page at all.

select * 
from ZK.T_BYSQ_KS_KC 
where KS_ZKZ > ${当前准考证} and rownum = 1
order by KS_ZKZ 
小葫芦

Why do you need to use sql to process it? Isn’t it very good to process it in Java, C#...

阿神

The student number selected in this way is the student number next to the current student number

select ks_zkz, lead(ks_zkz) over (order by ks_zkz) as next from T_BYSQ_KS_KC
phpcn_u1582
select min(ks_zkz) from ZK.T_BYSQ_KS_KC where KS_ZKZ>${当前准考证}
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template