Running the JDBC Insert example

Create a very simple JDBC class.

  1. Using Interactive SQL, connect to the demo database as user ID dba.
  2. Ensure the JDBCExamples class has been installed. It is installed together with the other Java examples classes.
  3. Call the method as follows:
    CALL JDBCExamples>>InsertFixed()
  4. Confirm that a row has been added to the department table.
    SELECT *
    FROM department

    The row with ID 201 is not committed. You can execute a ROLLBACK statement to remove the row.