ResultSet in JDBC- Types and Use
[crayon-5c67250a6b9bd924906600-i/] is an interface that can hold the records from the database. Types of ResultSet in JDBC ResultSet in JDBC can be of 3 types and can be defined while creation of the Statement 1. TYPE_FORWARD_ONLY – Default 2. TYPE_SCROLL_SENSITIVE – Created
Scrollable ResultSet in JDBC example
A normal ResultSet object can only move in forward direction. But using the ResultSet.TYPE_SCROLL_SENSITIVE we can create Scrollable Resultset in JDBC. What is Scrollable Resultset in JDBC Scrollable Resultset is the resultset which can move forward or backward or move to any
Update Record using ResultSet in JDBC
We know that ResultSet objects are used to get the data that is retrieved using a Select statement. ResultSet can also be used to insert or update records in the database. Steps to remember when you update Record using ResultSet in JDBC
Insert Record using ResultSet in JDBC
We know that ResultSet objects are used to get the data that is retrieved using a Select statement. ResultSet can also be used to insert or update records in the database. Steps to remember when you insert Record using ResultSet in JDBC
ResultSetMetaData in JDBC example
The object of [crayon-5c67250a6d69c867102745-i/] can be used to get the details of the columns available in the ResultSet object. Some of the important methods of ResultSetMetaData are [crayon-5c67250a6d6a5955771897/] Lets see ResultSetMetaData in JDBC example using some of the above methods ResultSetMetaData in
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 [crayon-5c67250a6dda6585497102-i/] example: [crayon-5c67250a6ddaf119819478-i/] 2. User Name User
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 procedure or to get data. Lets see the difference between Statement PreparedStatement and CallableStatement.
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 parameter returning from procedure 3. INOUT – acts as both
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 Batch processing can reduce a lot of
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 parameters in query dynamically. Steps to Delete record using Prepared Statement 1. Get a
- 1
- 2