Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Retrieving first occurrence - How?
In article <399AC15E.2CB1926C_at_Unforgetable.com>,
Walter T Rejuney <BlueSax_at_Unforgetable.com> wrote:
> GF wrote:
> >
I just always want the last record
> > that was added. There is no timestamp field.
Bluntly, although you may find a mechanism which appears to do what you want, it is (as others have said) unreliable. Donning my flame-proof suit, how's about saying "I have no money but I want to buy a car" instead of "there is no timestamp but I want the last record added".
>
> In a case like you describe probably the best way to provide that type
> of data is to have a non-wrapping sequence that has enough digits that
> it will never be exhausted
Bascially, a re-vamp of a timestamp which shows sequence. This will work, but I worry that using Oracle sequences you may care to consider the effect of CACHE on a sequence. You can (of course) turn such caching off, but at the end of the day extra effort to add such a new column might be better spent in adding a DATE column and be done with it.
Hope this is of use,
Mungo
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Thu Aug 17 2000 - 07:05:40 CDT
![]() |
![]() |