我需要update
一个带有2
值的表,其中一个是另一个表的列,第二个是数字(constant 1
),这是我的代码:
insert into table (col1, col2)
select colA from table2, '1'
where DATA_FORMAT(table2.created_at, '%y %m %d') = DATA_FORMAT(Now(), '%y %m %d');
错误信息是:
Error Code: 1064. 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 ''0', '1', '1' where DATA_FORMAT(newsletter.created_at, '%y %m %d') = DATA_FORMA' at line 2