Re: oracle sequence numbers
Date: Thu, 16 Jan 2003 14:35:08 -0600
Message-ID: <Xns93058A335DCEFpingottpingottbah_at_216.166.71.233>
rhairgroveNoSpam_at_Pleasebigfoot.com (Bob Hairgrove) wrote in
news:3e2707f5.1213124_at_news.webshuttle.ch:
> On Thu, 16 Jan 2003 09:40:02 -0600, Pablo Sanchez <pablo_at_dev.null>
> wrote:
>
>>Even worst, some DBMS update the timestamp any time the row is
>>affected since the timestamp data type is used for other purposes.
>
> Huh??
>
> Once you have written a value to a column, it should stay the same
> (unless you have a trigger implemented to update it)...
Which DBMS are you thinking about? Sybase ASE and (not suprisingly) SQL Server both behave this way.
The following is an example on ASE 11.9.2 (Linux) I just tested it on SQL Server 2000 which behaved the same way:
[23] X.x.1> create table plugh (random_column int, hot_dang timestamp);
[24] X.x.1> insert into plugh (random_column) values (1);
(1 row affected)
[25] X.x.1> select * from plugh;
random_column hot_dang
- -------------------- 1 0x0000000103303b36
(1 row affected)
[26] X.x.1> update plugh set random_column = 2;
(1 row affected)
[27] X.x.1> select * from plugh;
random_column hot_dang
- -------------------- 2 0x0000000103303b39
(1 row affected)
[28] X.x.1>
-- Pablo Sanchez, High-Performance Database Engineering http://www.hpdbe.comReceived on Thu Jan 16 2003 - 21:35:08 CET