On Wed, Mar 9, 2011 at 11:21 PM, Mr. Puneet Kishor <punk.k...@gmail.com> wrote:
>
> On Mar 9, 2011, at 5:19 PM, Armin Kunaschik wrote:
>
>> Hi there,
>>
>> I'm trying this for quite some time... and I'm totally stuck.
>>
>> I have the following table:
>>
>> CREATE TABLE example(
>>  date integer primary key not null,
>>  text text,
>>  ctime TIMESTAMP,
>>  mtime TIMESTAMP);
>>
>> ctime=creation time (should be set only once)
>> mtime=modification time (should be set every time the row is updated)
>>
>
> change ctime definition to
>
> ctime DEFAULT CURRENT_TIMESTAMP
>
> and use trigger for only the mtime
>
Unfortunately this will overwrite ctime with the new current time :-(
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to