Creating Database Objects Within CREATE SCHEMA

All database objects that a CREATE SCHEMA statement creates are owned by user, even if you do not explicitly name each database object. If you are the DBA, you can create database objects for another user. If you are not the DBA, specifying an owner other than yourself results in an error message.

Suppose that user oswald holds the DBA access privilege and issues the following CREATE SCHEMA statement:
CREATE SCHEMA AUTHORIZATION hilda
   CREATE ROW TYPE IF NOT EXISTS 
      hildago (field1 INT,
               field2 CHAR(18) NOT NULL,
               field3 DATE);
The owner of this named ROW type is the user whose authorization identifier is hilda, rather than user oswald who issued the CREATE ROW TYPE statement. This example would fail if user oswald does not hold the DBA privilege.

You can only grant access privileges with the CREATE SCHEMA statement; you cannot use CREATE SCHEMA to revoke or to drop access privileges.

If you create a database object or use the GRANT statement outside a CREATE SCHEMA statement, you receive warnings if you use the -ansi flag or set DBANSIWARN.