At 3:00 PM -0500 6/3/99, Davor Cengija wrote:
> let's say i have a table my_table with just 3 columns:
> id - primary key, auto_increment, int
> ts - timestamp(8)
> some_value - char(10)
>insert into my_table values('', '', 'a word');
> works good, of course, timestamp, id.... etc
>update my_table set some_value = 'other word' where id = .whatever.;
> causes the some_value to change, of course, AND ts (timestamp
> column) is updated as well, so it has the time when the row
> was updated, not inserted (what i'd expect).
> so, is it a bug od feature?
Well, what you're observing is how it's documented to work, so I guess
I'd say "feature".
> to avoid this problem, i'm using
>update my_table set some_value = 'other word', ts = ts where id = .whatever.;
> as mentioned in the manual under Update.
Now you know why it says that in the manual. :-)
Paul DuBois, paul@stripped
Northern League Chronicles: http://www.snake.net/nl/