Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Timestamp on Oracle database

Re: Timestamp on Oracle database

From: Javier Rojas <jrv_at_quisar.com>
Date: Wed, 02 Dec 1998 12:47:53 +0100
Message-ID: <366528E9.654B361A@quisar.com>

UPDATE table_name
  SET any_field = new_value

        updates_count = updates_count + 1
  WHERE pk = pk_value
    AND updates_count = old_updates_count

if SQL%ROWCOUNT = 1 then
  OK
else
  record delete or updated by another user end if;

Hope this help

Javier Rojas.

Veronica escribió:
>
> On the Oracle database, is a timestamp automatically generated whenever
> a user makes inserts/updates to a table? If so, where is this timestamp
> stored?
>
> I'm trying to develop a client application that accesses an Oracle
> database... I need to make sure that no 2 users are modifying the same
> record simultaneously (thats why I need to check the timestamp). I read
> somewhere that one way is to have 3 additional rows in each table:
> 1. TransactionUserName
> 2. TransactionTime ( I guess that's something like generating your own
> timestamp?)
> 3. TransactionFlag
> Apart from this method, are there any alternatives?
Received on Wed Dec 02 1998 - 05:47:53 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US