在mysql中将字符串与curdate连接

时间:2013-08-26 21:01:45

标签: mysql

我有以下查询:

INSERT INTO insertlog (Inforamtion) VALUES (
concat("Row Was Inserted",curdate());

MySQL正在返回错误,但我无法弄清楚原因。我的谷歌搜索没有显示如何执行此类操作的示例。

2 个答案:

答案 0 :(得分:1)

使用它更简单

    INSERT INTO insertlog (Inforamtion) 
    SELECT  concat("Row Was Inserted ",curdate()) ;

确保您的专栏是Information还是Inforamtion

您的查询也有效,但最后您错过了)。这里有两个解决方案的演示:

Demo to try here

答案 1 :(得分:1)

我认为你错过了一个结束)

此外,比尔指出,您可能错误地拼写了您的列名 - information