I have a table schema that looks like this:
mysql> desc category;
+-------------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------------+--------------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| name | varchar(255) | NO | | NULL | |
| create_date | datetime | NO | | NULL | |
+-------------+--------------+------+-----+---------+----------------+
3 rows in set (0.01 sec)
I have tried to insert data and I continue to get this error:
mysql> INSERT INTO category (id, name, create_date) VALUES (NULL, Family Events, 2016-25-12 00:00:00), (NULL, Work Events, 2016-25-12 00:00:00);
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Events, 2016-25-12 00:00:00), (NULL, Work Events, 2016-25-12 00:00:00)' at line 1
I have tried several other ways with the same result and I haven't found any good documentation.
I tried this:
mysql> INSERT INTO category(id, name, create_date) VALUES(NULL, 'Family Events', 'NOW()');
and got this error:
ERROR 1292 (22007): Incorrect datetime value: 'NOW()' for column 'create_date' at row 1