Java Reference
In-Depth Information
Display 19.14
Updating Rows with the UPDATE Statement (part 3 of 3)
Sample Dialogue
Loaded the embedded driver.
Connecting to the database...
Connected.
Enter the ID number of the author to change:
2
Enter the new URL for this author:
http://www.dansimmons.com/about/bio.htm
URL changed to http://www.dansimmons.com/about/bio.htm
There is much more to SQL and JDBC than what we have discussed here. However,
this section should give you a good idea about how to integrate SQL into a Java
application and provide a starting point to learn more.
Self-Test Exercises
9. Give the SQL SELECT command to produce a table of book titles
with corresponding author and author ID from the table Result in
Display 19.11 and one of the tables in Display 19.10 . Follow the example
of the SQL command in the text used to produce the Result table.
10. What is a connection string?
11. What is the difference between the execute( ) and executeQuery( )
methods of the JDBC Statement class?
12. Give the SQL statement to create the BooksAuthors table shown in
Display 19.10 .
13. Give the SQL statement to insert the four entries shown in Display 19.10
into the BooksAuthors table.
 
 
Search WWH ::




Custom Search