如果我有JDBC连接,我如何获得DB2上的当前模式?

时间:2022-05-31 09:12:07

If I have an instance of a JDBC DB2 connection, how do I get the current schema?

如果我有JDBC DB2连接的实例,我如何获得当前架构?

Either a SQL statement would work, or just a JDBC method call.

SQL语句可以工作,也可以只是JDBC方法调用。

2 个解决方案

#1


select current_schema  
from   sysibm.sysdummy1
;

#2


Take a look at Java API Makes Database Metadata as Easily Accessible as POJOs for an easy way to obtain schema information.

查看Java API使数据库元数据像POJO一样易于访问,以便轻松获取架构信息。

#1


select current_schema  
from   sysibm.sysdummy1
;

#2


Take a look at Java API Makes Database Metadata as Easily Accessible as POJOs for an easy way to obtain schema information.

查看Java API使数据库元数据像POJO一样易于访问,以便轻松获取架构信息。