Follow an exercise in reading data using JDBC.
- [Instructor] So now that we've talked about creating data…and how result sets work, let's jump in and actually…read some data from our database.…I'd like you to jump into your IDE.…And go ahead and open up your project.…And once again we're going to go to source main java…our base package…and we're going to start with our customer DAO.…All right, so once again we're going to create…a SQL statement here.…And we're going to do it by creating…a private static final string.…
And this time we are going to call it get one.…And it will be a select.…Now we're going to go ahead and numerate all of our values…instead of using a star operator.…When dealing with SQL queries in a bit of code…I find it much more efficient to actually go ahead…and write them all out so that you can…track what is what and where it is.…It doesn't always play out the way you would expect…if you don't do this.…
So it's just a lot easier to do.…So go ahead and put all our fields in.…And we are going to select this from customer…where customer ID equals question mark.…
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.