After a connection to a specific database is established, that Connection object can be utilized to send SQL statements. The Java JDBC's Statement instances are JDBC's mode of running SQL statements to the database. A Statement instance is utilized to send SQL statements to a database.There are three major types of Statement objects: the parent class Statement, and like that there are two more statements thePreparedStatement, and there is also the CallableStatement. These objects are instantiated with the help of Connection object in the JDBC data base connectivity .
Code:
Statement st = DBConnection.createStatement();
//This code will create an SQL Statement object
Bookmarks