简体   繁体   中英

Sysdate function in SQL Insert query

I am writing code in jsp. I am running following query, which runs well but place a NULL in entryDate -column in DB.

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.

int j=st.executeUpdate("insert into mtc (entryDate) values (SYSDATE())");

尝试以大写形式编写mysql函数:

int j=st.executeUpdate("insert into mtc (entryDate) values SYSDATE()");

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM