Re: Looking for the Oracle equivalent to MS SQL Server timestamp field
Date: Sun, 23 Feb 2003 16:46:43 +0100
Message-ID: <3E58ECE3.2040009_at_netscape.net>
Arch wrote:
> I'm looking for the Oracle data type and possibly method to shadow the
> MS SQL Server timestamp data type.
>
> From SQL Server Online help a timestamp is defined as:
> timestamp is a data type that exposes automatically generated binary
> numbers, which are guaranteed to be unique within a database.
> timestamp is used typically as a mechanism for version-stamping table
> rows. The storage size is 8 bytes.
>
> I'm not necessarily concernd that the datatype stays binary but the
> funcationality is what I'm after. In particular is the notion of
> ensuring that I can tell if a record has been updated since the data
> was pulled that I'm now working with and possibly updating back to the
> db system.
>
> Thanks in advance.
> Arch
Many front ends of oracle "know" about this - data being changed.
You can always lock the data, e.g. select ... for update, but this
is not the preferred way in e.g. HTML transactions. The data will
stay locked when another screen is selected.
There is a datatype timestamp (in 9i) that your can add to your
tables.
You can always query the data back to see if the data is changed.
-- Regards, Frank van BortelReceived on Sun Feb 23 2003 - 16:46:43 CET