sunnystar
asked on
How do I update a TIMESTAMP column of a MYSQL table with the current date and time in Java
I am trying to update a TIMESTAMP column of a MYSQL table with the current date and time in Java code.
String sqlString = "SELECT * FROM table WHERE ..." ;
Statement st = con.createStatement( ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_UPDATABLE ) ;
ResultSet rs = st.executeQuery(sqlString) ;
rs.first();
rs.updateInt("status", STATUS_OPTED_OUT) ;
???---what would go here for a column "update_time" ?
rs.updateRow();
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.