I'm trying to do with java and mysql the same I am used to with .net and SQL server:
By using Microsoft.SqlServer.Management.Smo I can access database structure information from my instance ( server name, table structure, columns, datatype, description, default value)
I tried to find to do the same with Java + MYSQL but it seems it is not so popular
any directions?
thanks
Ed
The simplest way to accomplish it is by retrying the connection metadata, first you open a connection:
Connection conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/db", "user","****");
DatabaseMetaData metaData = conn.getMetaData();
then start navigating through the metadata, you can check the available operations in DatabaseMedata
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With