Mysql语法错误:'WHERE NOT LIKE'

时间:2012-06-26 11:53:16

标签: mysql

我试图通过每24小时仅插入唯一值来跟踪页面视图。但是当我运行此查询时,我收到语法错误。

insert ignore into profilepageviews values( '77.777.777.777' , CURRENT_TIMESTAMP, '5') where hitdate NOT LIKE '%2012-06-26%'

错误:

#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 'where hitdate NOT LIKE '%2012-06-26%'' at line 1

1 个答案:

答案 0 :(得分:3)

您不能将WHERE条款与INSERT一起使用,您可能需要UPDATE