Subject Re: [firebird-support] The last records of a result set
Author Adomas Urbanavicius
Well, lets say we need 10 last surnames of a given set :
select
first 10 surnames from myTable order by surnames desc

Worse, more complex, less effective :)) :

select
skip
( (select count(*) from MyTable) - 10)
surnames
from MyTable


dr_bentonquest wrote:

>Hi there,
>
>I am using Firebrid 1.5.2 and need to get the last 10 records of a
>given result set. I'm sure a stored procedure is the answer, but would
>appreciate some ideas on actual code.
>
>Thanks in advance,
>
>-Benton
>
>
>
>
>
>
>