ALLBASE/SQL Reference Manual (36216-90216)

78 Chapter2
Using ALLBASE/SQL
Controlling Database Access
named Salary to that group when creating the table:
CREATE GROUP Managers
CREATE TABLE Managers.Salary...
When you refer in an SQL statement to a table, a view, a module, or an authorization
group, you specify both the owner's name and the name of the object. If you own the object,
however, you can omit the owner's name. When WOLFGANG@DBMS retrieves
information from the Parts table, for example, he must specify the owner name. For
example:
SELECT PartNumber FROM PurchDB.Parts
The system views belong to special owners named SYSTEM and CATALOG. Therefore
when you refer to one of the system views, you must specify that name:
SELECT * FROM System.Table
or
SELECT * FROM Catalog.Table
Default Owner Rules
In several statements, when a name is specified, such as table name, rule name, group
name, or index name, specification of the owner name is optional. The method of
determining the default owner when no owner is specified is as follows:
If the name is within a CREATE PROCEDURE statement (except for the procedure name
itself), and it is not within a CREATE SCHEMA statement in that procedure, then the
default owner is the procedure's owner.
If the name is within a CREATE SCHEMA statement and it is not within a CREATE
PROCEDURE statement in that schema, then the default owner name is the
authorization name of that schema.
If you have specified an owner using the ISQL SET OWNER command, everything you
create will be owned by the owner specified in that command.
If you use the -o option to specify an alternate DBEUserID prior to preprocessing an
application containing embedded SQL statements, then the owner specified is the
default owner of the module.
If none of the above apply, then the default owner name is the current DBEUserID. The
DBEUserID is the logon name concatenated with ‘@’ and concatenated with the group
name.
In CREATE INDEX, CREATE RULE, DROP INDEX, DROP RULE, the default owner for the
index or rule name, respectively, has additional possible values which are described with
those statements.
Ownership Privileges
The following summarizes the privileges that extend to users or members of groups that
own objects:
Group owners can add members to and remove them from their group as well as drop
the group.