> select * from temp2;
+------------+-----+
| to | id |
+------------+-----+
| 2020-08-10 | 222 |
| 2020-08-12 | 223 |
+------------+-----+
Здесь 'to' имеет тип date, а 'id' - varchar.
UPDATE temp2 SET to= '2020-07-12' where id ='222' ;
UPDATE temp2 SET to= '2014-03-16 00:00:00.000' where id='123';
Ни одна из этих строк не работает Это показывает ошибку:
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 'to= '2014-03-16 00:00:00.000' where id=123' at line 1