ALLBASE/SQL Reference Manual (36216-90216)

Chapter 11 437
SQL Statements E - R
GRANT
ALTER grants authority to add new columns. ALTER authority is not allowed for a
view.
INDEX grants authority to create and drop indexes. INDEX authority is not
allowed for a view.
UPDATE grants authority to change data in existing rows. A list of column names
can be specified to grant UPDATE authority only for specific columns.
Omitting the list of column names grants authority to update all columns.
REFERENCES grants authority to reference columns in the table from the foreign keys in
other tables. A list of column names can be specified to grant
REFERENCES authority only for specific columns. Omitting the list of
column names grants authority to reference
all
columns. REFERENCES
authority is not allowed for a view.
[
Owner
.]
TableName
designates a table for which authority is to be granted.
[
Owner
.]
ViewName
designates a view for which authority is to be granted.
TO The TO clause designates the users, authorization groups, and classes to
be given the specified authority. You must specify a login name when
specifying a DBEUserID. Authority granted to PUBLIC can be exercised
by
all
users having CONNECT or DBA authority. Granting authority to a
class is useful when program modules are owned by a class.
WITH GRANT OPTION allows the grantee of a privilege to grant that same privilege to
another user. If WITH GRANT OPTION is specified, then all privileges
being granted in the statement are granted with the grant option to all
grantees. The grantee cannot be a group. The authority to grant cannot
come solely from group membership.
BY specifies a DBEUserID or class as grantor of a privilege. This clause is
used to provide a parent for an orphaned privilege. The named grantor
cannot be a group or PUBLIC.
Authorization — Grant Table or View Authority
If you have DBA or OWNER authority directly (not due to group membership), or were
previously granted table privileges with the WITH GRANT OPTION clause, you can issue
the GRANT statement with the WITH GRANT OPTION clause for that table or view.
The BY clause can only be used by a DBA.
A user may be granted a privilege from one grantor only. OWNER, DBA, or grantable
authority is required to issue the GRANT statement.
SQL Syntax — Grant RUN or EXECUTE Authority
GRANT {RUN ON [
Owner
.]
ModuleName
EXECUTE ON PROCEDURE [
Owner.
]
ProcedureName
}TO
{{
DBEUserID
GroupName
ClassName
} [,...]
PUBLIC }