UPDATE

Find the code snippet for update operation:

override fun updateUser(userModel: UserModel) {
val updateQuery = "UPDATE users SET name=?,email=?, contact_number=? WHERE id=?"
jdbcTemplate.update(updateQuery, userModel.name, userModel.email, userModel.contact_number, userModel.id)
}

updateQuery = "UPDATE users SET name=?,email=?, contact_number=? WHERE id=?" is the query to update a user from the user table by using the ID. jdbcTemplate.update() will execute the query and update the data.