Database MetaData Platform
Output the Database Platform and JDBC Driver information.
Javadoc available at https://www.javatapas.com/docs/javatapas/sql/DatabaseMetadataPlatform.html
public static void databaseMetadataPlatform(Connection connection) throws SQLException {
DatabaseMetaData databaseMetaData = connection.getMetaData();
System.out.println("Database Platform Information");
System.out.println("===========================");
System.out.println("Database Product Name: " + databaseMetaData.getDatabaseProductName());
System.out.println("Database Product Version: " + databaseMetaData.getDatabaseProductVersion());
System.out.println("Database Major Version: " + databaseMetaData.getDatabaseMajorVersion());
System.out.println("Database Minor Version: " + databaseMetaData.getDatabaseMinorVersion());
System.out.println("Database Maximum Column Length: " + databaseMetaData.getMaxColumnNameLength());
System.out.println();
System.out.println("JDBC Driver Information");
System.out.println("===========================");
System.out.println("Driver Name: " + databaseMetaData.getDriverName());
System.out.println("Driver Version: " + databaseMetaData.getDriverVersion());
System.out.println("Driver Major Version: " + databaseMetaData.getDriverMajorVersion());
System.out.println("Driver Minor Version: " + databaseMetaData.getDriverMinorVersion());
System.out.println("JDBC Major Version: " + databaseMetaData.getJDBCMajorVersion());
System.out.println("JDBC Minor Version: " + databaseMetaData.getJDBCMinorVersion());
}