Hello Monzy,
In DB2 schema can be seen (more or less)as the 'owner' of a table. If you create a table in DB2 it is often handy to be able to give privileges to a group of tables instead of having to do that for each table individually. The default schemaname is copied from the user that connects to the database to create the table. You can however select a different schemaname for a table.
Schema have to be explicitly created as an object with the 'create schema' statement (or using control center GUI).
User-ID that holds SYSADM or DBADM authority can create any valid schemaname, other users can only create schema that is identical to their user ID.
This means that if you connect to a database using just your ID , a select statement on a table will run on that table using the matching schema.
You can change schema with:
set current schema = 'new_schema'
T. Blom
Information analist
Shimano Europe
tbl@shimano-eu.com