I have an sql file containing, say,
INSERT INTO mytable (ID, Date) VALUES (1, datetime.date(2023, 2, 22));
How do I create a table that will accept this? More explicitly, in
CREATE TABLE mytable(ID INT NOT NULL, Date ???)) ENGINE=INNODB;
what should I put in place of '????'?
When I substitute varchar(12)
for ????
,
I get the error message:
mysql.connector.errors.ProgrammingError: 1630 (42000): FUNCTION datetime.date does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual.
Checking doesn't reveal any insights, at least for me. What should I be doing?