[英]Sysdate function in SQL Insert query
I am writing code in jsp. 我在用jsp编写代码。 I am running following query, which runs well but place a
NULL
in entryDate
-column in DB. 我正在运行以下查询,该查询运行良好,但在DB中的
entryDate
中放置了NULL
。
int j=st.executeUpdate("insert into mtc (entryDate) values sysdate()");
What is mistake in this query? 这个查询有什么错误?
I have to store current system date in entryDate
-column. 我必须将当前系统日期存储在
entryDate
中。
int j=st.executeUpdate("insert into mtc (entryDate) values (SYSDATE())");
尝试以大写形式编写mysql函数:
int j=st.executeUpdate("insert into mtc (entryDate) values SYSDATE()");
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.