title: Obtaining Table metadata from mysql in java
body: <p>Is there a way to get table metadata before first executing select query on the table?</p>
  
  <p>Restated: Is there a way to get the column size of a specific row and column of data for the numeric types: int, tinyint, bigint, etc?</p>
  
  <pre><code>DatabaseMetaData md = connection.getMetaData();
  ResultSet rs = dbmd.getColumns(null, null, tableName, "%");
  </code></pre>
  
  <p>I can't use the above code as the <code>COLUMN_SIZE</code> for numeric type(<code>int,tinyint,bigint,etc</code>) will return the maximum allowed size for these types. I need to get the columnDisplaySize.</p>
  
  <p>The above code will return 10 for <code>int(8)</code>, but I need 8 which I can get from resultMetaData of a table.</p>
  
  <p>So is there a way to do this without running a select statement first.</p>
  
  <p>Thanks</p>