
Java Standard Edition 6 comes with the "java.sql" package. You should import all the classes in that package. JDBC requires a driver to run. You load the driver in your code with a Class.forName.
Any SQL can be sent to the database using JDBC. By default, the objects used to connect to the database automatically commit after each statement. You should use the close method on the connection object to free database resources.