Follow an exercise in updating data using JDBC.
- [Instructor] So now that we've created some data…and we've read some data,…it's time to jump in…and actually update some data in our database.…I'd like you to open up your ID,…and once again we're going to go to src, main, java,…open up our base package and open up the CustomerDAO.…Once again, we are going to add in…a private static final String,…and this time we're going to call it UPDATE.…And we're going to set that equal to,…give IT a little more real estate here on the screen.…
We're going to create a statement that says…UPDATE customer SET.…And then we're going to go through our whole object,…and set all of our values.…So first_name equals question mark,…last_name equals question mark,…and all the way through the rest of our object.…
And now we're going to set it WHERE customer_id…equals question mark.…And that's all there is to the update statement itself.…So now let's scroll down to our update method,…and we're ready to implement it.…So just like we've done before,…we'll create a customer object and set it equal to null.…
AuthorFrank P Moley III
- Deciphering JDBC terminology
- Using containerized PostgreSQL
- Creating, reading, updating, and deleting data
- The Repository pattern
- Using stored procedures
- Ordering and limiting results
- Transactions in JDBC
- Handling exceptions
Skill Level Intermediate
Database Foundations: Core Conceptswith Adam Wilbert2h 14m Beginner
Programming Foundations: Databaseswith Simon Allardice3h 11m Appropriate for all
Java Essential Training: Objects and APIswith David Gassner2h 46m Intermediate
What you need to know5m 10s
1. Introducing Java Data Access
2. Data Access Basics
3. Advanced Data Access
Next steps3m 26s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.