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.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.22.61.218