Subject | Re: [firebird-support] Serial number in a query result |
---|---|
Author | Jaison Joseph |
Post date | 2011-03-25T06:40:49Z |
>>> That trickiness appears in the FAQ: "How to get record number as part ofThe above solution does not have any side effects, am I right?
>>> dataset?" http://www.firebirdfaq.org/faq343/
>>>
>>> A throw-away SEQUENCE would also do the trick, I think:(Actually, i only checked the first solution, ie from the faq)
>>>
>>> sql> create sequence AdHoc;
>>> sql> select next value for AdHoc as SrNo, d.* FROM (...) d;
>>>
>>> -Mike
>>>
>>>
>> This is exactly what I want.
> Needless to say, if the generator/sequence is used by multiple users,Thank you very much,
> then this isn't safe.
Jaison.