List of articles   Terminology   Choose language


Extraction of next portion of sorted data


It's possible to request no all unsorted records, but only records, beginning from some certain record, about which we know values of all its fields. This is reached by expression

select   ...      from ...  where ...
start by @m1=100  @m2=null  @m3="string";

It's possible to request no all sorted records, but only records, beginning from some certain record - it's necessary to apply simultaneously sorting and starting for this. This is reached by expression

select   ...      from ...  where ...
order by @m2 asc, @m3 desc, @m1 asc
start by @m1=100  @m2=null  @m3="string";
Quantity of extracted records can be limited, then expression looks so
select   ...      from ...  where ...
order by @m2 asc, @m3 desc, @m1 asc
start by @m1=100  @m2=null  @m3="string"
limit 20;

Dmitry Turin



List of articles   Terminology   Choose language


Сайт управляется системой uCoz