how do i get the current schema on DB2 if i have a

2019-02-04 15:30发布

问题:

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

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

回答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.



标签: jdbc db2