Skip to content

Latest commit

 

History

History

jdbc

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

#JDBC

So here we have a basic file MainJdbc.java which show how to get a connection to a database, and do the 4 operation in SQL.

Try to get the hand of it, by creating function for all of them. Like writePerson, deletePerson and updatePerson. writePerson take a String, and will create a new person with that String as a name. deletePerson take an int, and will delete the person with this int as an id. updatePerson, take an int and a String and will change the name of the person with this int as an id, with the String given.

Here is the SQL to create the table and to insert two person : Person.sql