Create table using JDBC Statement API

Program to create a table in oracle database using JDBC’s java.sql.Statement API.


Log-in to SQL-PLUS with user name/password and see whether the EMPLOYEE table is created or not.










Note:From JDBC 4.0 (from Java6) onwards we no need to load data base driver jar using class.forName();

Just add the database driver jar (ojdbc6.jar for oracle) in the class path. It will load when Drivermanager.getConnection() method called.

How to add database jar to class path:  Right Click on project -> Properties -> Java Build Path

Click on Add External JAR, add ojbdc6.jar and click on ok.

















Posted in jdbc.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.