471,887 Members | 1,513 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,887 software developers and data experts.

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 3131
<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
reply views Thread by zermasroor | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.