How to get column type of a column in a table with JDBC?

In the following example, all the Employee table column names and their data types are printed using methods of ResultSetMetaData like getColumnName() and getColumnType(). Example on column type JDBC import java.sql.*; public class GetDataInfo { public static void main(String args[]) throws Exception { Class.forName(“sun.jdbc.odbc.JdbcOdbcDriver”); Connection con = DriverManager.getConnection(“jdbc:odbc:snrao”,”scott”,”tiger”); Statement stmt = con.createStatement( ); ResultSet res …

How to get column type of a column in a table with JDBC? Read More »