How to manipulate a MaxDB Database using JDBC – Part 2
In my previous weblog a simple MaxDB database access using the JDBC Interface was discussed. This weblog discusses the same but shows how more than one query can be used in a JDBC code, creating tables in MaxDB using JDBC, inserting values into tables, executing queries on them to produce desirable output and finally deleting tables.
|Creating a Table and Inserting values into them|
The command executeUpdate() can be used to perform the manipulation tasks like Create, Insert, Drop etc. The below code explains how we can create a table, insert values into it. Then as discussed before a Select query is executed to show the data present in the table.
|Creating, Inserting, and Deleting tables|
The next task is to delete a table that is present in the database. As discussed before the same can be achieved using the executeUpdate() method. The below program is one full cycle from a table creation, inserting values, quering on the same and finally deleting the database table.