Uploaded February 2017 | Updated September 2026, 1 week ago
In this video, I have explained how to make use of PreaparedStatement to do database operation easily and efficiently. The PreparedStatement interface is a subinterface of Statement. It is used to execute parameterized query.
Let's see the example of parameterized query:
String sql="insert into table_name values(?,?,?)";
As you can see, we are passing parameter (?) for the values. Its value will be set by calling the setter methods of PreparedStatement.
This tutorial series covers following topics
■ Connecting Java Program to MySQL Database
■ Inserting data into database
■ Fetching data from database
■ Updating an entry in database
■ Creating a table programmatically
■ Using PreparedStatements
■ Display database contents in JTable
- Genuine Coder
genuinecoder.com
In this video, I have explained how to make use of PreaparedStatement to do database operation easily and efficiently. The PreparedStatement interface is a subinterface of Statement. It is used to execute parameterized query.
Let's see the example of parameterized query:
String sql="insert into table_name values(?,?,?)";
As you can see, we are passing parameter (?) for the values. Its value will be set by calling the setter methods of PreparedStatement.
This tutorial series covers following topics
■ Connecting Java Program to MySQL Database
■ Inserting data into database
■ Fetching data from database
■ Updating an entry in database
■ Creating a table programmatically
■ Using PreparedStatements
■ Display database contents in JTable
- Genuine Coder
genuinecoder.com










