how to get table structre of a database in java?
Use DatabaseMetaData to get the table information.
You can use the getTablexxx()
and getColumnxx()
methods to get the table information.
Connection conn = DriverManager.getConnection(.....);
DatabaseMetaData dbmd = conn.getMetaData();
dbmd.getxxxx();