[JAVA] List of column names when connecting.getMetaData (). GetColumns () of MySQL Table with JDBC

A complete personal memorandum when retrieving schema information for a table using JDBC. It is in index order. I will add a description soon

Column name Description Value example
TABLE_CAT Database name database_name
TABLE_SCHEM null
TABLE_NAME table name table_name
COLUMN_NAME Column name id
DATA_TYPE 4
TYPE_NAME INT UNSIGNED
COLUMN_SIZE 10
BUFFER_LENGTH 65535
DECIMAL_DIGITS null
NUM_PREC_RADIX 10
NULLABLE 0
REMARKS Comments on the column Column comment
COLUMN_DEF null
SQL_DATA_TYPE 0
SQL_DATETIME_SUB 0
CHAR_OCTET_LENGTH null
ORDINAL_POSITION 1
IS_NULLABLE NO
SCOPE_CATALOG null
SCOPE_SCHEMA null
SCOPE_TABLE null
SOURCE_DATA_TYPE null
IS_AUTOINCREMENT YES
IS_GENERATEDCOLUMN NO

Recommended Posts

List of column names when connecting.getMetaData (). GetColumns () of MySQL Table with JDBC
Whether to enable SSL when using JDBC with MySQL.
JDBC connection with MySQL 8.x * Notes *