General rules

Types and functions of the definition SQL

The definition SQL enables users to define and modify schemas and to define and delete tables, indexes, and privileges.

Table 3-1 lists the types and functions of the definition SQL.

Table 3-1 Types and functions of definition SQL

TypeFunction
ALTER PROCEDURE (Recreate SQL object of procedure)Recreates the SQL object of a procedure.
ALTER ROUTINE (Recreate SQL objects for functions, procedures, and triggers)Recreates SQL objects for functions, procedures, and triggers.
ALTER TABLE (Alter table definition)
  • Adds a new column to the end of a base table.
  • Increases the maximum length of an existing column of the variable-length data type.
  • Changes data types.
  • Deletes a base table column that contains no data.
  • Changes the uniqueness constraint for cluster keys for a base table containing no data.
  • Renames tables and columns.
  • Assigns the updatable column attribute.
  • Changes the table to a falsification-prevented table.
  • Changes the partitioning storage condition for row partitioned tables and matrix partitioned tables.
ALTER TRIGGER (Recreate trigger SQL object)Recreates a trigger SQL object.
COMMENT (Comment)Provides a comment in a table or column.
CREATE ALIAS (Define alias)Defines a table alias to allow access to tables in other RD nodes.
CREATE AUDIT (Define audit event)Defines audit events and their targets to be recorded as an audit trail.
CREATE CONNECTION SECURITY (Definition of the connection security facility)Defines security items related to the connection security facility.
CREATE FOREIGN INDEX (Define foreign index)Defines a foreign index for a column of a foreign table.
CREATE FOREIGN TABLE (Define foreign table)Defines a foreign table.
CREATE FUNCTION (Define function)Defines a function.
CREATE INDEX (Define index)Defines an index (in ascending or descending order) for columns in a base table.
CREATE PROCEDURE (Define procedure)Defines a procedure.
CREATE SCHEMA (Define schema)Defines a schema.
CREATE SERVER (Define foreign server)Defines a foreign database as a foreign server.
CREATE TABLE (Define table)Defines a base table.
CREATE TRIGGER (Define trigger)Defines a trigger.
CREATE TYPE (Define type)Defines an abstract data type.
CREATE USER MAPPING (Define user mapping)For access to a foreign database, defines the mapping of authorization identifiers and passwords.
CREATE VIEW (Define view)Defines a view table.
CREATE PUBLIC VIEW (Define public view)Defines a public view.
DROP AUDIT (Delete audit event)Removes definitions that match the target audit events defined in CREATE AUDIT from being audited.
DROP ALIAS (Delete alias)Deletes a table alias that has been created to allow access to tables in other RD nodes.
DROP DATA TYPE (Delete user-defined data type)Deletes an abstract data type.
DROP CONNECTION SECURITY (Delete connection security facility)Deletes security items related to the connection security facility.
DROP FOREIGN INDEX (Delete foreign index)Deletes a foreign index.
DROP FOREIGN TABLE (Delete foreign table)Deletes a foreign table.
DROP FUNCTION (Delete function)Deletes a function.
DROP INDEX (Delete index)Deletes an index.
DROP PROCEDURE (Delete procedure)Deletes a procedure.
DROP SCHEMA (Delete schema)Deletes a schema.
DROP SERVER (Delete foreign server)Deletes the definition of a foreign server.
DROP TABLE (Delete table)Deletes a base table, as well as any indexes, comments, access privileges, and view tables associated with the base table.
DROP TRIGGER (Delete trigger)Deletes a trigger.
DROP USER MAPPING (Delete user mapping)Deletes user mapping.
DROP VIEW (Delete view table)Deletes a view table.
DROP PUBLIC VIEW (Delete public view)Deletes a public view.
GRANT CONNECT (Grant CONNECT privilege)Grants the CONNECT privilege to users.
GRANT DBA (Grant DBA privilege)Grants the DBA privilege to users.
GRANT RDAREA (Grant RDAREA usage privilege)Grants the RDAREA usage privilege to users.
GRANT SCHEMA (Grant schema definition privilege)Grants the schema definition privilege to users.
GRANT access privilege (Grant access privileges)Grants access privileges to users.
GRANT AUDIT (Change auditor password)Changes the auditor's password.
REVOKE CONNECT (Revoke CONNECT privilege)Revokes previously granted CONNECT privileges.
REVOKE DBA (Revoke DBA privilege)Revokes previously granted DBA privileges.
REVOKE RDAREA (Revoke RDAREA usage privilege)Revokes previously granted RDAREA usage privileges.
REVOKE SCHEMA (Revoke schema definition privilege)Revokes previously granted schema definition privileges.
REVOKE access privilege (Revoke access privileges)Revokes previously granted access privileges.

Common rules

Upon normal execution of a definition SQL statement, a COMMIT is made simultaneously with the completion of the processing.

Notes

A definition SQL cannot be specified from an X/Open-compliant UAP running under OLTP.