469,344 Members | 6,455 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,344 developers. It's quick & easy.

390/V7 timestamp column auto updated??

i can't find either confirmation or contradiction in the docs
available. a colleague asserts that a column defined TIMESTAMP
is always and automatically updated when any column in the row
is changed; no triggers or application code needed. is he
smoking something he shouldn't be?

Nov 12 '05 #1
1 3076
<gn*****@rcn.com> wrote in message
news:11*********************@c13g2000cwb.googlegro ups.com...
i can't find either confirmation or contradiction in the docs
available. a colleague asserts that a column defined TIMESTAMP
is always and automatically updated when any column in the row
is changed; no triggers or application code needed. is he
smoking something he shouldn't be?

If the column is defined as "NOT NULL WITH DEFAULT" then an insert statement
that does not supply a value for the column will default to the current
timestamp. The value will not change on an UPDATE unless the statement uses
either "current timestamp" or "default" as the value in the SET clause.

So in answer to your question, yes, your friend is smoking something.
Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by kingofkolt | last post: by
1 post views Thread by David Greenberg | last post: by
3 posts views Thread by Randell D. | last post: by
reply views Thread by qwerty_1997 | last post: by
7 posts views Thread by laurenq uantrell | last post: by
6 posts views Thread by Robert Schuldenfrei | last post: by
7 posts views Thread by JJ | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.