Java examples for JDBC:Database Meta Data
Getting the Maximum Table Name Length in a Database
import java.sql.Connection; import java.sql.DatabaseMetaData; import java.sql.SQLException; public class Main { public static void main(String[] argv) { try {//from w ww.j av a 2s . c o m Connection connection = null; // Gets database metadata DatabaseMetaData dbmd = connection.getMetaData(); // Get max table name length int length = dbmd.getMaxTableNameLength(); } catch (SQLException e) { } } }