The object of java.sql.ResultSetMetaData can be used to get the details of the columns available in the ResultSet object. Some of the important methods of ResultSetMetaData are [crayon-68eb
Connect to Oracle Database using JDBC
In this post we will see the sample code to connect to Oracle Database using JDBC drivers in java. For connecting to Oracle database we will need the following 1. Connection URL The format is [cray
Difference between Statement PreparedStatement and CallableStatement
Statement PreparedStatement and CallableStatement are interfaces of JDBC that are used to interact with the Database, either to execute the insert’s, updates, deletes or to call a stored proc
CallableStatement example with IN OUT parameters
CallableStatement in JDBC is used to execute Stored Procedures. A Stored Procedure can have 3 types of parameters 1. IN – is input parameter to the procedure 2. OUT – is output paramete
Batch Processing using Prepared Statement in Java
Batch processing is a feature in JDBC used to club multiple SQLs and send it to database in one call. You can get more details on Batch Processing here Advantages of Batch processing 1. Performance
Delete record using Prepared Statement in Java
PreparedStatement is an interface and has pre-compiled SQL statements. PreparedStatements are used to efficiently execute the same SQL statement multiple times. They are also used to set the parame
Update record using Prepared Statement in Java
PreparedStatement is an interface and has pre-compiled SQL statements. PreparedStatements are used to efficiently execute the same SQL statement multiple times. They are also used to set the parame
Insert record using Prepared Statement in Java
PreparedStatement is an interface and has pre-compiled SQL statements. PreparedStatements are used to efficiently execute the same SQL statement multiple times. They are also used to set the parame
Select records using Prepared Statement
To select records using Prepared Statement in java we use
1 |
ResultSet executeQuery(String sql) throws SQLException |
Batch Processing using Statement in Java
Batch processing is a feature in JDBC used to club multiple SQLs and send it to database in one call. Imagine you have 100’s of inserts to be fired using JDBC, this will take 100’s of c