// 获取数据库的元数据信息

DatabaseMetaData metaData = conn.getMetaData();

// 获取数据库名称的方法

System.out.println(metaData.getUserName());

 

暂时只用到这一个方法,查询数据库名称,其他的,如果大家想要用什么字段,可以通过API来完成,后续如果用到了哪些方法,会进行更新。

相关文章:

  • 2021-06-24
  • 2022-12-23
  • 2021-04-14
  • 2018-06-04
  • 2022-12-23
  • 2022-12-23
  • 2021-10-19
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-01-09
  • 2022-12-23
  • 2021-11-28
  • 2022-12-23
相关资源
相似解决方案