> I new use of mysql.
> I would like to know if a table I could set a "automatic" field to
> CURRENT_DATE as:
> CREATE TABLE my_table (
> date DATE DEFAULT CURRENT_DATE());
> I know is set of commands isn't working... But I would like to do something
> like that if possible
Do the following ...
CREATE TABLE my_table (date_added DATE);
and then, when INSERTing rows, set the date to NULL and it'll be stamped with
the current date automatically...
INSERT INTO my_table (date_added) VALUES (NULL);
Note that I've renamed the field from "date" to "date_added" to avoid ambiguity
-- "date" is a reserved word so not such a good choice for a field name.