Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

jdbc

db2

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.

like image 686
phil swenson Avatar asked Jul 13 '09 20:07

phil swenson


People also ask

What is schema in JDBC?

Schema is a logical namespace that contains database objects such as tables, views, indexes, etc. Each schema belongs to one database, and each database has at least one schema. If not specified otherwise, the default schema in PostgreSQL is public.

What is DB2 database schema?

The objects in a relational database are organized into sets called schemas. A schema is a collection of named objects that provides a logical classification of objects in the database. The first part of a schema name is the qualifier.


1 Answers

select current_schema  
from   sysibm.sysdummy1
;
like image 191
Bevo Avatar answered Oct 07 '22 18:10

Bevo