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
db connection notes
Connect to multiple MySQL instances with SSL enabled in JDBC
Connect to MySQL 8 with Java
Use Spring JDBC with Spring Boot
Use SpatiaLite with Java / JDBC
VisualVM (JMX connection) with Kubernetes
I tried connecting to MySQL using JDBC Template with Spring MVC
"Rails 6 x MySQL 8" Docker environment construction procedure for sharing with teams
List of column names when connecting.getMetaData (). GetColumns () of MySQL Table with JDBC