List:General Discussion« Previous MessageNext Message »
From:Ed Carp Date:July 30 2002 1:24pm
Subject:RE: How to get timestamp of inserted record
View as plain text  
> suppose I have added one field time_stamp of type
> timestamp in any existing table. it will show the
> current timestamp of all records. If i update any
> record after sometime It will also update the
> timestamp of updated record with current timestamp.
> 
> but for insertion of any record...what i have to
> do...i have to mention the current timestamp value
> with values of all fields of a record or is there any
> way to insert new record so that it will automatically
> take current timestamp for that record.
> 
> Plz specify the sql query also, if u know right now. 

insert into whatever_table (time_stamp) values (NOW());
update whatever_table set time_stamp=NOW();
--
Ed Carp, N7EKG          http://www.pobox.com/~erc               214/986-5870
Director, Software Development
Escapade Server-Side Scripting Engine Development Team
Pensacola - Dallas - London - Dresden
http://www.squishedmosquito.com 
Thread
RE: How to get timestamp of inserted recordtoby -30 Jul