tags:

views:

751

answers:

2

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  A: 
select current_schema  
from   sysibm.sysdummy1
;
Bevo
A: 

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

Sualeh Fatehi