On 6/29/07, Kees Nuyt <[EMAIL PROTECTED]> wrote:
On Wed, 27 Jun 2007 20:42:18 -0400, you wrote:
>1) Faster to do the timestamp in the sql statement, since it does not
>require activation of the trigger.
>2) Query looks 'cleaner', not having an explicit datetime() inside
>3) Can switch the timestamp between UTC and localtime by modifying the
>trigger as opposed to changing and recompiling the application.

4) Triggers can't be forgotten, so the stamping will be more
consistent, much like constraints.

and
5) use "DEFAULT CURRENT_TIMESTAMP" in the create statement.

Example:

CREATE TABLE x ( a, b DEFAULT CURRENT_TIMESTAMP );

INSERT INTO TABLE x (a) VALUES (12345);

b has an automatic timestamp.


Regards,
~Nuno Lucas

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to