PreparedStatement in JDBC

In my previous blog Getting started with Java Database Connectivity we had seen how to connect to MySQL using the JDBC API and also learnt how to execute queries on MySQL database using command line and using a java program. In this blog we will take a closer look at the JDBC Statement Classes.
Following mind map represents three types of statements classes that are provided by JDBC API to executing queries on database:


We had used Statement in the previous blog Getting Started with JDBC. In this blog, we will be executing queries using PreparedStatement. Let’s get our hands dirty!

In this blog we have seen simple usage of PreparedStatement. In the future blogs we will play more around the database, till than Happy Learning!

Leave a Reply

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

Scroll to Top