問一個(gè)問題(user_name,sex,age,birthday,email,mobile," + "create_user,create_date,update_user,update_date,isdel)中create_date是什么?還是一種日期格式
Connection conn=DBUtil.getConnection();
String sql="" +
"insert into imooc_goddess" +
"(user_name,sex,age,birthday,email,mobile," +
"create_user,create_date,update_user,update_date,isdel)" +
"values(" +
"?,?,?,?,?,?,?,current_date(),?,current_date(),?)";
PreparedStatement ptmt=conn.prepareStatement(sql);
2018-02-06
create_date是Date對(duì)象,映射到數(shù)據(jù)庫后就是時(shí)間對(duì)象,存儲(chǔ)的是當(dāng)前的時(shí)間。