How to Insert Record using JDBC Statement in Java

Insert Record using JDBC Statement

In this tutorial, We will show you How to Insert Record using JDBC Statement in Java.

Table Information

1. Table Query

CREATE TABLE customer (customerId INT, customerName VARCHAR(30), customerAge INT, customerAddress VARCHAR(60), PRIMARY KEY(customerId));

2. Table Structure

Insert Record using JDBC Statement

Project Structure

Insert Record using JDBC Statement

RecordInsert.java

Output

Record Inserted Successfully..

How to Insert Record using JDBC Statement in Java

Download Source Code

Download Here

References

1. Java SQL Documentation
2. Java SQL Connection API
3. Java Statement API