Subject Re: About the timestamp data type
Author Adam
--- In firebird-support@yahoogroups.com, Andi Wangsadijaya
<And1_Wangsadijaya@y...> wrote:
>
> Hello firebird-support,
>
> I have 2 databases. The 1st database has a table that contains
> timestamp data type. This table doesn't have trigger or something
> else. It's just a table. Every update to this table, the field) that
> type is timestap) always update with the current date and time
> automatically.

The Timestamp datatype is simply a field that can contain both a date
and a time. It does not automatically set itself to any value.

However I think there is a possibility this behaviour can happen if
you dont commit after adding the field before manipulating it. I
don't recall the exact sequence, but every time you select it it gets
updated.

> But the 2nd database (which has a table that contains timestamp
> data type too, but different structure) doesn't update the field
> with the current date and time automatically everytime update
occurs.

This is normal. If you want to automatically update the timestamp,
then you need to use a trigger.

> What's wrong with this table?

Double check that you or someone else haven't accidentally placed a
trigger in this table that could be causing this. Otherwise, drop the
field, commit, add the field again, commit.

One other possibility is that you are looking at a computed field not
a real field.

Adam