SupportWriter space ↗
A JOURNAL ABOUT TECHNOLOGY

Learn something new.
Write. Share.

A space to connect knowledge, one line of code a day.
Discover tutorials, ideas, and notes from a learning journey.

1967 notes & counting ↙
EDITOR’S PICK ↗
Pentesting

Planning Your First Web Application Pentest: Scope, Safety, and Evidence

Build a focused web pentest plan with clear authorization, realistic objectives, controlled testing, and evidence that developers can use.

D Putu Adi Guna Permana · 3 min read
FOR YOUR CURIOSITY

Latest notes.

JDBC / NOTES</>↗
JDBC18 Jan 2026

How do I use auto-generated keys in JDBC?

To use auto-generated keys in JDBC (like an AUTO_INCREMENT primary key), you need to follow a three-step process: notify the statement you want the keys, execute the update, and then retrieve them from a special ResultSet. Here is a practical example using PreparedStatement: 1. Prepare the Statement When creating your PreparedStatement, you must pass the […]

Wayan · 2 min read
JDBC / NOTES</>↗
JDBC18 Jan 2026

How do I batch insert data with JDBC?

To batch insert data with JDBC, you typically use the addBatch() and executeBatch() methods. This is much more efficient than executing individual INSERT statements because it reduces the number of round-trips between your application and the database. The most common and secure way to do this is with a PreparedStatement. Batch Insert with PreparedStatement Using […]

Wayan · 2 min read
JDBC / NOTES</>↗
JDBC17 Jan 2026

How do I delete rows with JDBC?

To delete rows from a database using JDBC, you use the executeUpdate() method. This method is used for SQL statements that modify data (like DELETE, INSERT, or UPDATE) and returns an integer representing the number of rows affected. While you can use a simple Statement, it is highly recommended to use a PreparedStatement to prevent […]

Wayan · 2 min read
JDBC / NOTES</>↗
JDBC17 Jan 2026

How do I insert rows with JDBC?

To insert rows into a database using JDBC, you typically use the executeUpdate(String sql) method of a Statement or PreparedStatement object. Here are the two primary ways to do it: 1. Using PreparedStatement (Recommended) This is the standard approach because it prevents SQL Injection and is more efficient for repeated inserts. package org.kodejava.jdbc; import java.sql.Connection; […]

Wayan · 2 min read
JDBC / NOTES</>↗
JDBC16 Jan 2026

How do I update rows with executeUpdate?

In JDBC, the executeUpdate method is used for SQL statements that modify data, such as UPDATE, INSERT, or DELETE. Unlike executeQuery, which returns a ResultSet, executeUpdate returns an int representing the number of rows affected by the operation. Here is how you can update rows using PreparedStatement (the recommended way) and Statement. 1. Using PreparedStatement […]

Wayan · 2 min read
JDBC / NOTES</>↗
JDBC16 Jan 2026

How do I fetch results with ResultSet?

To fetch results using a ResultSet in Java JDBC, you follow a standard pattern of executing a query, iterating through the rows, and extracting data using “getter” methods. Basic Fetching Pattern Execute the Query: Use stmt.executeQuery(sql) (for Statement) or pstmt.executeQuery() (for PreparedStatement). Iterate through Rows: Use a while (rs.next()) loop. The next() method moves the […]

Wayan · 2 min read
✳

Knowledge grows when shared.

Stay curious. There is always something new to learn.

Explore notes ↗
Putu Adi Guna Permana
ABOUT THE AUTHOR

Dr (C). Ir. Putu Adi Guna Permana, S.Kom., M.Kom., IPM., ASEAN Eng.

Writer and founder of Diary Coding — sharing notes, tutorials, and experiences about programming for anyone who wants to keep learning.