Ask Your Question

How to autofill the date in a database table [closed]

asked 2014-03-08 00:29:39 +0100

Slow Motion gravatar image

I've created a small Database and would like each record date stamped automatically when it's created. I just can't figure it out. I was even looking for a way to write the function CURRENT_DATE or some variation as an autofill field but can't figure out how to do it. Thanks for any help

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2016-02-20 06:56:50.968610

2 Answers

Sort by » oldest newest most voted

answered 2014-03-08 02:57:11 +0100

m.a.riosv gravatar image

updated 2014-03-08 02:57:45 +0100

edit flag offensive delete link more

answered 2015-09-12 06:31:16 +0100

babak7 gravatar image

Mariosv's answer is correct as his youtube video demonstrate very well. I specially liked it because the video was in Spanish and I am learning Spanish and I was supersized that I could understand the video without any problem. The only thing I need to add is that if the column , Ie. the field, is already created, you can use following line instead of the line he is using in the video. Here is my attempt to say this in Spanish: Si ya se ha creado el field, puede utilizar la línea siguiente:

 alter table "Table1" alter  COLUMN "Date" TIMESTAMP default now
edit flag offensive delete link more

Question Tools

1 follower


Asked: 2014-03-08 00:29:39 +0100

Seen: 3,854 times

Last updated: Mar 08 '14