Insert tables in Oracle via jdbc

I have never done anything with JDBC or a lot with Oracle, but I connected to my jdbc as follows:

     String driverName = "oracle.jdbc.driver.OracleDriver";
         Class.forName(driverName);

         // Create a connection to the database
         String serverName = "xxx.xx.xx;
         String portNumber = "1521";
         String sid = "mysid";
         String url = "jdbc:oracle:thin:@" + serverName + ":" + portNumber  
                                               + ":" + sid;
         String username = "PGSWLOG";
         String password = "PGDEV";
         connection = DriverManager.getConnection(url, username, password);

Now, what classes do I need to use to insert tables into the database? Any help would be appreciated. TIA

+3
source share
2 answers

When you wrote insert tables into the database, you meant

1) Create a new table in the database or

2) Add a new row (s) to an existing database table?

Either way, read the tutorials published by @Marcelo Hernández Ris , and then follow the good examples for JDBC and Sql92 at http://www.java2s.com/ .

+1
source

All Articles