Professional Documents
Culture Documents
MySQL Java Tutorial - MySQL Programming in Java With JDBC
MySQL Java Tutorial - MySQL Programming in Java With JDBC
ZetCode
All Spring Boot Python C# Java JavaScript Subscribe
This is a Java tutorial for the MySQL database. It covers the basics of MySQL programming
in Java with JDBC. ZetCode has a complete e-book for MySQL Java: MySQL Java
programming e-book.
In this tutorial, we use the MySQL Connector/J driver. It is the official JDBC driver for
MySQL. The examples were created and tested on Ubuntu Linux. You might also want to
check Java tutorial, PostgreSQL Java tutorial, MySQL tutorial, or Spring JdbcTemplate
tutorial on ZetCode.
Ad
JDBC
JDBC is an API for the Java programming language that defines how a client may access a
database. It provides methods for querying and updating data in a database. JDBC is
oriented towards relational databases. From a technical point of view, the API is as a set of
classes in the java.sql package. To use JDBC with a particular database, we need a JDBC
driver for that database.
connecting to a database;
sending queries and update statements to the database;
retrieving and processing the results received from the database in answer to the
https://zetcode.com/db/mysqljava/ Page 1 of 29
MySQL Java tutorial - MySQL programming in Java with JDBC 4/20/21, 2:50 PM
query.
MySQL Connector/J
To connect to MySQL in Java, MySQL provides MySQL Connector/J, a driver that
implements the JDBC API. MySQL Connector/J is a JDBC Type 4 driver. The Type 4
designation means that the driver is a pure Java implementation of the MySQL protocol
and does not rely on the MySQL client libraries. In this tutorial, we use MySQL Connector/J
5.1.41, which is a maintenance release of the 5.1 production branch.
Connection string
A database connection is defined with a connection string. It contains information such as
database type, database name, server name, and port number. It also may contain
additional key/value pairs for configuration. Each database has its own connection string
format.
jdbc:mysql://[host1][:port1][,[host2][:port2]]...[/[database]]
[?propertyName1=propertyValue1[&propertyName2=propertyValue2]...]
It is possible to specify multiple hosts for a server failover setup. The items in square
brackets are optional. If no host is specified, the host name defaults to localhost. If the port
for a host is not specified, it defaults to 3306, the default port number for MySQL servers.
jdbc:mysql://localhost:3306/testdb?useSSL=false
Setting up MySQL
In this section, we are going to install MySQL server, create a testdb database, and a test
user.
https://zetcode.com/db/mysqljava/ Page 2 of 29
MySQL Java tutorial - MySQL programming in Java with JDBC 4/20/21, 2:50 PM
This command installs the MySQL server and various other packages. While installing the
package, we are prompted to enter a password for the MySQL root account.
Next, we are going to create a new database user and a new database. We use the mysql
client.
We check if the MySQL server is running. If not, we need to start the server. On Ubuntu
Linux, this can be done with the sudo service mysql start command.
$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 43
Server version: 5.7.21-0ubuntu0.16.04.1 (Ubuntu)
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
We use the mysql monitor client application to connect to the server. We connect to the
database using the root account. We show all available databases with the SHOW
DATABASES statement.
We create a new testdb database. We will use this database throughout the tutorial.
mysql> quit;
Bye
We create a new database user. We grant all privileges to this user for all tables of the testdb
database.
Maven file
We use the following Maven file:
pom.xml
https://zetcode.com/db/mysqljava/ Page 3 of 29
MySQL Java tutorial - MySQL programming in Java with JDBC 4/20/21, 2:50 PM
<modelVersion>4.0.0</modelVersion>
<groupId>com.zetcode</groupId>
<artifactId>AppName</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.45</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<configuration>
<mainClass>com.zetcode.AppName</mainClass>
<cleanupDaemonThreads>false</cleanupDaemonThreads>
</configuration>
</plugin>
</plugins>
</build>
<name>AppName</name>
</project>
The POM file has a dependency for the MySQL driver. We also include the exec-maven-
plugin for executing Java programs from Maven. Between the <mainClass></mainClass> tags
we provide the full name of the application.
JdbcMySQLVersion.java
package com.zetcode;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.logging.Level;
import java.util.logging.Logger;
https://zetcode.com/db/mysqljava/ Page 4 of 29
MySQL Java tutorial - MySQL programming in Java with JDBC 4/20/21, 2:50 PM
if (rs.next()) {
System.out.println(rs.getString(1));
}
We connect to the database and get some info about the MySQL server.
This is the connection URL for the MySQL database. Each driver has a different syntax for
the URL. In our case, we provide a host, a port, and a database name.
We establish a connection to the database, using the connection URL, user name, and
password. The connection is established with the getConnection() method.
The createStatement() method of the connection object creates a Statement object for sending
SQL statements to the database.
The executeQuery() method of the connection object executes the given SQL statement,
which returns a single ResultSet object. The ResultSet is a table of data returned by a specific
SQL statement.
The try-with-resources syntax ensures that the resources are cleaned up in the end.
if (result.next()) {
System.out.println(result.getString(1));
}
A ResultSet object maintains a cursor pointing to its current row of data. Initially the cursor
is positioned before the first row. The next() method moves the cursor to the next row. If
there are no rows left, the method returns false. The getString() method retrieves the value of
a specified column. The first column has index 1.
https://zetcode.com/db/mysqljava/ Page 5 of 29
MySQL Java tutorial - MySQL programming in Java with JDBC 4/20/21, 2:50 PM
In case of an exception, we log the error message. For this console example, the message is
displayed in the terminal.
$ mvn exec:java -q
5.7.21-0ubuntu0.16.04.1
We run the program from the command line. The Manen's -q option runs Maven in quiet
mode; i.e. we only see error messages.
mysql_tables.sql
USE testdb;
The SQL commands create four database tables: Authors, Books, Testing, and Images. The
tables are of InnoDB type. InnoDB databases support foreign key constraints and
transactions. We place a foreign key constraint on the AuthorId column of the Books table.
We fill the Authors and Books tables with initial data.
https://zetcode.com/db/mysqljava/ Page 6 of 29
MySQL Java tutorial - MySQL programming in Java with JDBC 4/20/21, 2:50 PM
JdbcPrepared.java
package com.zetcode;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;
pst.setString(1, author);
pst.executeUpdate();
}
}
}
pst.setString(1, author);
https://zetcode.com/db/mysqljava/ Page 7 of 29
MySQL Java tutorial - MySQL programming in Java with JDBC 4/20/21, 2:50 PM
pst.executeUpdate();
The prepared statement is executed. We use the executeUpdate() method of the statement
object when we don't expect any data to be returned. This is when we create databases or
execute INSERT, UPDATE, DELETE statements.
$ mvn exec:java -q
A new author has been inserted
mysql> select * from Authors;
+----+--------------------+
| Id | Name |
+----+--------------------+
| 1 | Jack London |
| 2 | Honore de Balzac |
| 3 | Lion Feuchtwanger |
| 4 | Emile Zola |
| 5 | Truman Capote |
| 6 | Trygve Gulbranssen |
+----+--------------------+
6 rows in set (0.00 sec)
JdbcNotPreparedTesting.java
package com.zetcode;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.logging.Level;
import java.util.logging.Logger;
String cs = "jdbc:mysql://localhost:3306/testdb?useSSL=false";
String user = "testuser";
String password = "test623";
https://zetcode.com/db/mysqljava/ Page 8 of 29
MySQL Java tutorial - MySQL programming in Java with JDBC 4/20/21, 2:50 PM
real 4m14.716s
user 0m6.820s
sys 0m0.404s
JdbcPreparedTesting.java
package com.zetcode;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;
String cs = "jdbc:mysql://localhost:3306/testdb?useSSL=false";
String user = "testuser";
String password = "test623";
pst.setInt(1, i * 2);
pst.executeUpdate();
}
https://zetcode.com/db/mysqljava/ Page 9 of 29
MySQL Java tutorial - MySQL programming in Java with JDBC 4/20/21, 2:50 PM
pst.setInt(1, i * 2);
pst.executeUpdate();
}
real 3m53.962s
user 0m6.280s
sys 0m0.380s
Now it took 3.53 minutes to finish the 5000 inserts. We saved 20 seconds.
JdbcRetrieve.java
package com.zetcode;
import java.sql.PreparedStatement;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;
while (rs.next()) {
System.out.print(rs.getInt(1));
System.out.print(": ");
System.out.println(rs.getString(2));
}
We get all authors from the Authors table and print them to the console.
https://zetcode.com/db/mysqljava/ Page 10 of 29
MySQL Java tutorial - MySQL programming in Java with JDBC 4/20/21, 2:50 PM
We execute a query that selects all columns from the Authors table. We use the
executeQuery() method. The method executes the given SQL statement, which returns a
single ResultSet object. The ResultSet is the data table returned by the SQL query.
while (rs.next()) {
System.out.print(rs.getInt(1));
System.out.print(": ");
System.out.println(rs.getString(2));
}
The next() method advances the cursor to the next record. It returns false when there are no
more rows in the result set. The getInt() and getString() methods retrieve the value of the
designated column in the current row of this ResultSet object as an int and String of the Java
programming language.
$ mvn exec:java -q
1: Jack London
2: Honore de Balzac
3: Lion Feuchtwanger
4: Emile Zola
5: Truman Capote
6: Trygve Gulbranssen
We execute the program; we have IDs and names of authors printed to the console.
Properties
It is a common practice to put the configuration data outside the program in a separate file.
This way the programmers are more flexible. We can change the user, a password or a
connection url without needing to recompile the program. It is especially useful in a
dynamic environment, where is a need for a lot of testing, debugging, securing data etc.
In Java, the Properties is a class used often for this. The class is used for easy reading and
saving of key/value properties.
db.properties
db.url=jdbc:mysql://localhost:3306/testdb?useSSL=false
db.user=testuser
db.passwd=test623
We have a db.properties file in which we have three key/value pairs. These are dynamically
loaded during the execution of the program.
JdbcProperties.java
package com.zetcode;
import java.io.FileInputStream;
import java.io.IOException;
https://zetcode.com/db/mysqljava/ Page 11 of 29
MySQL Java tutorial - MySQL programming in Java with JDBC 4/20/21, 2:50 PM
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.PreparedStatement;
import java.util.Properties;
import java.util.logging.Level;
import java.util.logging.Logger;
return props;
}
while (rs.next()) {
System.out.print(rs.getInt(1));
System.out.print(": ");
System.out.println(rs.getString(2));
}
We connect to the testdb database and print the contents of the Authors table to the console.
This time, we load the connection properties from a file. They are not hard coded in the
proram.
https://zetcode.com/db/mysqljava/ Page 12 of 29
MySQL Java tutorial - MySQL programming in Java with JDBC 4/20/21, 2:50 PM
The Properties class is created. The data is loaded from the file called db.properties, where we
have our configuration data.
db.properties
# mysql properties
mysql.driver=com.mysql.jdbc.Driver
mysql.url=jdbc:mysql://localhost:3306/testdb?useSSL=false
mysql.username=testuser
mysql.password=test623
ComLineDSEx.java
package com.zetcode;
import com.mysql.jdbc.jdbc2.optional.MysqlDataSource;
import java.io.FileInputStream;
import java.io.IOException;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.PreparedStatement;
import java.util.Properties;
import java.util.logging.Level;
import java.util.logging.Logger;
https://zetcode.com/db/mysqljava/ Page 13 of 29
MySQL Java tutorial - MySQL programming in Java with JDBC 4/20/21, 2:50 PM
return ds;
}
MysqlDataSource ds = getMySQLDataSource();
if (rs.next()) {
https://zetcode.com/db/mysqljava/ Page 14 of 29
MySQL Java tutorial - MySQL programming in Java with JDBC 4/20/21, 2:50 PM
JdbcMulStat.java
package com.zetcode;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
String cs = "jdbc:mysql://localhost:3306/"
+ "testdb?allowMultiQueries=true&useSSL=false";
String user = "testuser";
String password = "test623";
do {
try (ResultSet rs = pst.getResultSet()) {
while (rs.next()) {
System.out.print(rs.getInt(1));
System.out.print(": ");
System.out.println(rs.getString(2));
}
isResult = pst.getMoreResults();
}
} while (isResult);
}
}
}
In the code example, we retrieve three rows from the Authors table. We use three SELECT
statements to get three rows.
String cs = "jdbc:mysql://localhost:3306/"
+ "testdb?allowMultiQueries=true&useSSL=false";
We enable multiple statements queries in the database URL by setting the allowMultiQueries
parameter to true.
Here we have a query with multiple statements. The statements are separated by a
semicolon.
https://zetcode.com/db/mysqljava/ Page 15 of 29
MySQL Java tutorial - MySQL programming in Java with JDBC 4/20/21, 2:50 PM
We call the execute() method of the prepared statement object. The method returns a
boolean value indicating if the first result is a ResultSet object. Subsequent results are called
using the getMoreResults() method.
do {
try (ResultSet rs = pst.getResultSet()) {
while (rs.next()) {
System.out.print(rs.getInt(1));
System.out.print(": ");
System.out.println(rs.getString(2));
}
isResult = pst.getMoreResults();
}
} while (isResult);
The processing of the results is done inside the do while loop. The ResultSet is retrieved with
the getResultSet() method call. To find out if there are other results, we call the
getMoreResults() method.
$ mvn exec:java -q
1: Jack London
2: Honore de Balzac
3: Lion Feuchtwanger
This is the output of the example. The first three rows were retrieved from the Authors table.
Ad
JdbcColumnHeaders.java
package com.zetcode;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
https://zetcode.com/db/mysqljava/ Page 16 of 29
MySQL Java tutorial - MySQL programming in Java with JDBC 4/20/21, 2:50 PM
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;
String cs = "jdbc:mysql://localhost:3306/testdb?useSSL=false";
String user = "testuser";
String password = "test623";
while (rs.next()) {
In this program, we select authors from the Authors table and their books from the Books
table. We print the names of the columns returned in the result set. The output is
formatted.
This is the SQL statement which joins authors with their books.
To get the column names we need to get the ResultSetMetaData. It is an object that can be
used to get information about the types and properties of the columns in a ResultSet object.
https://zetcode.com/db/mysqljava/ Page 17 of 29
MySQL Java tutorial - MySQL programming in Java with JDBC 4/20/21, 2:50 PM
while (rs.next()) {
We print the data to the console. The first column is 21 characters wide and is aligned to the
left.
$ mvn exec:java -q
NAME Title
Jack London Call of the Wild
Jack London Martin Eden
Honore de Balzac Old Goriot
Honore de Balzac Cousin Bette
Lion Feuchtwanger Jew Suess
Emile Zola Nana
Emile Zola The Belly of Paris
Truman Capote In Cold blood
Truman Capote Breakfast at Tiffany
JdbcAutoGenKey.java
package com.zetcode;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.logging.Level;
import java.util.logging.Logger;
pst.setString(1, author);
pst.executeUpdate();
https://zetcode.com/db/mysqljava/ Page 18 of 29
MySQL Java tutorial - MySQL programming in Java with JDBC 4/20/21, 2:50 PM
if (rs.first()) {
In the example, we add a new author to a table that has its primary key auto-incremented
by MySQL. We retrieve the generated ID.
if (rs.first()) {
Since we have only one insert statement, we use first() to navigate to the value.
$ mvn exec:java -q
The ID of new author: 7
JdbcWriteImage.java
package com.zetcode;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.sql.Connection;
import java.sql.DriverManager;
https://zetcode.com/db/mysqljava/ Page 19 of 29
MySQL Java tutorial - MySQL programming in Java with JDBC 4/20/21, 2:50 PM
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;
String cs = "jdbc:mysql://localhost:3306/testdb?useSSL=false";
String user = "testuser";
String password = "test623";
In the preceding example, we read a PNG image from the current working directory and
insert in into the Images table.
We create a File object for the image file. To read bytes from this file, we create a
FileInputStream object.
The binary stream is set to the prepared statement. The parameters of the setBinaryStream()
method are the parameter index to bind, the input stream, and the number of bytes in the
stream.
pst.executeUpdate();
https://zetcode.com/db/mysqljava/ Page 20 of 29
MySQL Java tutorial - MySQL programming in Java with JDBC 4/20/21, 2:50 PM
JdbcReadImage.java
package com.zetcode;
import java.io.FileOutputStream;
import java.io.IOException;
import java.sql.Blob;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;
if (result.next()) {
fos.write(buf, 0, len);
https://zetcode.com/db/mysqljava/ Page 21 of 29
MySQL Java tutorial - MySQL programming in Java with JDBC 4/20/21, 2:50 PM
The FileOutputStream object is created to write to a file. It is meant for writing streams of raw
bytes such as image data.
We get the image data from the Data column by calling the getBlob() method.
We figure out the length of the blob data. In other words, we get the number of bytes.
The getBytes() method retrieves all bytes of the Blob object, as an array of bytes.
fos.write(buf, 0, len);
The bytes are written to the output stream. The image is created on the filesystem.
Transaction support
A transaction is an atomic unit of database operations against the data in one or more
databases. The effects of all the SQL statements in a transaction can be either all committed
to the database or all rolled back.
The MySQL database has different types of storage engines. The most common are the
MyISAM and the InnoDB engines. There is a trade-off between data security and database
speed. The MyISAM tables are faster to process and they do not support transactions. On
the other hand, the InnoDB tables are more safe against the data loss. They support
transactions and are slower to process.
JdbcTransaction.java
package com.zetcode;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.logging.Level;
import java.util.logging.Logger;
https://zetcode.com/db/mysqljava/ Page 22 of 29
MySQL Java tutorial - MySQL programming in Java with JDBC 4/20/21, 2:50 PM
con.setAutoCommit(false);
con.commit();
try {
con.rollback();
} catch (SQLException ex1) {
}
} catch (SQLException ex) {
Logger.getLogger(JdbcTransaction.class.getName()).log(
Level.SEVERE, null, ex);
}
}
}
In this program, we want to change the name of the author on the first row of the Authors
table. We must also change the books associated with this author. This is a good example
where a transaction is necessary. If we change the author and do not change the author's
books, the data is corrupted.
con.setAutoCommit(false);
To work with transactions, we must set the autocommit mode to false. By default, a
database connection is in autocommit mode. In this mode each statement is committed to
the database as soon as it is executed. A statement cannot be undone. When the
autocommit is turned off, we commit the changes by calling the commit() or roll it back by
calling the rollback() method.
The third SQL statement has an error. There is no Titl column in the table.
con.commit();
try {
https://zetcode.com/db/mysqljava/ Page 23 of 29
MySQL Java tutorial - MySQL programming in Java with JDBC 4/20/21, 2:50 PM
con.rollback();
} catch (SQLException ex1) {
In case of an exception, the transaction is rolled back. No changes are committed to the
database.
JdbcNoTransaction.java
package com.zetcode;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.logging.Level;
import java.util.logging.Logger;
https://zetcode.com/db/mysqljava/ Page 24 of 29
MySQL Java tutorial - MySQL programming in Java with JDBC 4/20/21, 2:50 PM
We have the same example. This time, without the transaction support.
An exception is thrown again. Leo Tolstoy did not write Martin Eden; the data is corrupted.
Batch updates
When we need to update data with multiple statements, we can use batch updates. Batch
updates are available for INSERT, UPDATE, DELETE, statements as well as for CREATE
TABLE and DROP TABLE statements.
JdbcBatchUpdate.java
package com.zetcode;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.logging.Level;
import java.util.logging.Logger;
con.setAutoCommit(false);
https://zetcode.com/db/mysqljava/ Page 25 of 29
MySQL Java tutorial - MySQL programming in Java with JDBC 4/20/21, 2:50 PM
con.commit();
con.rollback();
} catch (SQLException ex2) {
This is an example program for a batch update. We delete all data from the Authors table
and insert new data. We add one new author, Umberto Eco to see the changes.
After adding all commands, we call the executeBatch() to perform a batch update. The
method returns an array of committed changes.
con.commit();
con.rollback();
} catch (SQLException ex2) {
https://zetcode.com/db/mysqljava/ Page 26 of 29
MySQL Java tutorial - MySQL programming in Java with JDBC 4/20/21, 2:50 PM
$ mvn exec:java -q
Committed 8 updates
We execute the BatchUpdate program. The SELECT statement shows that the Authors2 table
was successfully updated. It has a new author, Umerto Eco.
We need to have proper file permissions for our testuser; otherwise, we get access denied
error message.
For security reasons, MySQL starts with --secure-file-priv option enabled, which only allows
to work with files in a certain directory. The directory is specified in the secure_file_priv
variable. On Windows, the path is something like 'C:/ProgramData/MySQL/MySQL Server
5.7/Uploads'.
ExportCSV.java
package com.zetcode;
import java.sql.PreparedStatement;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;
https://zetcode.com/db/mysqljava/ Page 27 of 29
MySQL Java tutorial - MySQL programming in Java with JDBC 4/20/21, 2:50 PM
pst.execute();
} catch (SQLException ex) {
To export data into a file, we use the SELECT INTO OUTFILE SQL statement.
$ cat /var/lib/mysql-files/authors_books.csv
Jack London,Call of the Wild
Jack London,Martin Eden
Honore de Balzac,Old Goriot
Honore de Balzac,Cousin Bette
Lion Feuchtwanger,Jew Suess
Emile Zola,Nana
Emile Zola,The Belly of Paris
Truman Capote,In Cold blood
Truman Capote,Breakfast at Tiffany
This was the MySQL Java tutorial. You might be also interested in JDBI tutorial, Java H2
tutorial, PostgreSQL Java tutorial, Java MongoDB tutorial, or MySQL tutorial.
Ad
https://zetcode.com/db/mysqljava/ Page 28 of 29
MySQL Java tutorial - MySQL programming in Java with JDBC 4/20/21, 2:50 PM
https://zetcode.com/db/mysqljava/ Page 29 of 29