Java operating Oracle database code case

catalogue

1. First create a student table in Oracle Database:

2. Add some data to the table

1. Add ojdbc6 Import jar into the project

2. Create a class and start coding

3. Create a test class

Oracle database first creates a table and adds some data

2. Add some data to the table

Writing java code in MyEclipse

1. Add ojdbc6 Import jar into the project

First create a project, and then right-click -- > New -- > folder over the project; folder name:lib; This creates a folder Lib in the project; Then add ojdbc6 The jar package is imported into this folder

Move the mouse over the package; Right click -- > build path -- > add to build path;

2. Create a class and start coding

3. Create a test class

As noted in the test class, you can only connect to the Oracle database in the correct way, add, delete, modify and query operations, but the processing mechanism for some error operations is not perfect.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>