From: | Darrin Crook <crook(at)nexus(dot)as(dot)utexas(dot)edu> |
---|---|
To: | Tulassay Zsolt <zsolt(at)tek(dot)bke(dot)hu> |
Cc: | pgsql-sql(at)postgreSQL(dot)org |
Subject: | Re: [SQL] auto datetime update on UPDATE? |
Date: | 1999-11-01 14:46:35 |
Message-ID: | Pine.LNX.4.10.9911010841220.29107-100000@nexus.as.utexas.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
This is wat I have done to solve the problem.
UPDATE table SET modification_dt = datetime('now'::abstime);
You can update any other field at the same time. This enters the date-time
stamp into the filed. And you can use this format for INSET INTO also.
I hope this helps.
Darrin Crook crook(at)nexus(dot)as(dot)utexas(dot)edu
McDonald Observatory wk: 915-426-4167
The University of Texas at Austin hm: 915-426-3652
On Sun, 31 Oct 1999, Tulassay Zsolt wrote:
> i have set up a table, where two fields (creation_dt and modification_dt)
> always get the actual date/time by default when doing an INSERT.
> my question is, how is it possible to let the field modification_dt
> change when doing an UPDATE?
> Is there a way to solve it in SQL?
From | Date | Subject | |
---|---|---|---|
Next Message | Oskar Liljeblad | 1999-11-01 18:47:07 | query with subquery abnormally slow? |
Previous Message | Baris Ulu | 1999-11-01 07:04:53 | Rule plan string too big is overcome, but... |