Subject | Re: [firebird-support] How do I limit an SQL search list to 10 records? |
---|---|
Author | Clyde Eisenbeis |
Post date | 2019-12-13T20:03:28Z |
On Fri, Dec 13, 2019 at 12:15 PM Mark Rotteveel mark@... [firebird-support] <firebird-support@yahoogroups.com> wrote:On 13/12/2019 19:07, Clyde Eisenbeis cte677@... [firebird-support]
wrote:
> Is <timestamp> a field I create, or is it part of all records?
It is a field you create. Which is why I wrote "Where <table> is the
table in question, and <timestamp> is a suitable column (eg a timestamp)
to determine what the newest record is."
You might be able to use the pseudo-column RDB$RECORD_VERSION, but that
is not necessarily in the right order of recency, because the value is
the transaction-number that wrote the last version of the record. This
means that updates to a record will also make it 'recent' and a record
written by a long-running transaction might not show up as 'recent' (or
at least as older than it may actually be).
Mark
--
Mark Rotteveel