java的DatabaseMetaData获取mysql表和字段注释
Properties props =new Properties();
props.put("user", "root");
props.put("password", "root");
props.put("useInformationSchema","true"); //表注释
Connection con = null;
try {
Class.forName("com.mysql.jdbc.Driver");
con = DriverManager.getConnection("jdbc:mysql://133.96.46.13:3306/test?useUnicode=true&characterEncoding=utf-8", props);
} catch (SQLException e1) {
e1.printStackTrace();
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
本站声明:网站内容来源于网络,如有侵权,请联系我们https://www.qiquanji.com,我们将及时处理。
微信扫码关注
更新实时通知