求高人解答一下为什么日期可以直接insert string格式,不需要转成datetime格式?
insert ignore into actor
values (1, "PENELOPE", "GUINESS", "2006-02-15 12:34:33"),
(2, "NICK", "WAHLBERG", "2006-02-15 12:34:33")
以下转成datetime格式也能跑。
insert ignore into actor
values (1, "PENELOPE", "GUINESS", str_to_date("2006-02-15 12:34:33", "%Y-%m-%d %H:%i:%s")),
(2, "NICK", "WAHLBERG", str_to_date("2006-02-15 12:34:33", "%Y-%m-%d %H:%i:%s"))