Hitachi

Hitachi Advanced Database Setup and Operation Guide


3.8.2 Defining a schema

Once you are able to enter SQL statements, define the schemas. Schemas are a logical concept that includes tables. Unless a schema is defined, you cannot create tables.

Organization of this subsection

(1) Executing an SQL statement for defining a schema

To define a schema, use the CREATE SCHEMA definition SQL statement. Enter the SQL statement described below and press Enter.

Be sure that a semicolon (;) is the last character you enter, or the SQL statement will not be executed.

CREATE SCHEMA ADBUSER02;

This defines a schema for the user ADBUSER02. The name of the schema defined here must be the same as the user ID (authorization identifier) specified in the adbsql command.

(2) Confirming the schema definition result

A message is displayed when the schema ADBUSER02 is defined. The following shows an example of the output message.

■ Example of the output message
KFAA96403-I SQL processing completed.

When you have confirmed that a schema exists, schema definition is complete.

(3) Related item

CREATE SCHEMA (define a schema) in Definition SQL in the manual HADB SQL Reference