ALLBASE/SQL Reference Manual (36216-90216)

Chapter 10 355
SQL Statements A - D
CREATE TABLE
TO PUBLIC. This gives any user with CONNECT authority the ability to
read and modify the table as well as to alter the table and create indexes
on it. To change this grant, use the REVOKE statement and the GRANT
statement. The locking strategy remains unchanged, even if you change
the grant.
PUBLICROW enables the table to be read and updated by concurrent transactions. The
locking unit is a row (tuple) in PUBLICROW tables. In general, a
transaction locks a row in share mode before reading it and in exclusive
mode before updating it. For small tables with small rows, concurrency can
be maximized by using the PUBLICROW type.
This option automatically issues the statement GRANT ALL ON
TableName
TO PUBLIC. This gives any user with CONNECT authority the ability to
read and modify the table as well as to alter the table and create indexes
on it. To change this grant, use the REVOKE statement and the GRANT
statement. The locking strategy remains unchanged, even if you change
the grant.
[
Owner
.]
TableName
is the name to be assigned to the new table. Two tables cannot have
the same owner name and table name.
You can specify the owner of the new table if you have DBA authority. If
you do not have DBA authority, you can specify the owner as the name of
any group to which you belong. If you do not specify the owner name, your
DBEUserID, schema authorization name, procedure owner, or the ISQL
SET OWNER name becomes the owner of the new table. For more
information, refer to the section "Default Owner Rules" in the chapter
"Using ALLBASE/SQL."
TableLanguageName
specifies the language for the new table. This name must be either
n-computer or the language of the DBEnvironment. The default is the
language of the DBEnvironment.
ColumnDefinition
defines an individual column in a table. Each table must have at
least one column. The syntax for a CREATE TABLE column definition is
presented separately in another section below.
UniqueConstraint
defines a uniqueness constraint for the table. Each table can have
multiple unique constraints, but can have only one specifying PRIMARY
KEY. The syntax for a
UniqueConstraint
is presented separately in
another section below.
ReferentialConstraint
defines a referential constraint of this table with respect to
another (or the same) table. The referencing table (this one) and the
referenced table (the other one) satisfy the constraint if, and only if each
row in the referencing table contains either a NULL in a referencing
column, or values in the rows of the referencing columns equal the values
in the rows of the referenced columns. The syntax of a
ReferentialConstraint
is presented separately in another section
below.
CheckConstraint
defines a check constraint for the table. A table can have multiple
check constraints. The syntax for a check constraint is presented