SQL$HELP_OLD72.HLB  —  GRANT  Arguments  POSITION n
    Specifies the position of the entry within the ACL to be modified
    or created.

    With the AFTER or POSITION argument, you can specify the position
    in the list after which SQL searches for an ACL entry with an
    identifier that matches the one specified in the TO clause of the
    GRANT statement.

    Following are specifics about the AFTER and POSITION arguments:

    o  In the AFTER argument, the identifier specifies the entry in
       the ACL after which SQL begins its search for the entry to be
       modified or created. If none of the entries in the ACL has an
       identifier that matches the identifier specified in the AFTER
       argument, SQL generates an error and the statement fails.

       Starting after the entry specified by the identifier in the
       AFTER argument, SQL searches the entries in the ACL. If an
       entry has an identifier that matches the identifier specified
       by the TO clause of the GRANT statement, SQL creates a new
       entry that contains only those privileges specified in the
       GRANT statement. SQL retains only the entry appearing first in
       the ACL, and deletes any entries with duplicate identifiers.

       If none of the entries has an identifier that matches the
       identifier specified by the TO clause of the GRANT statement,
       SQL creates a new ACL entry immediately following the
       identifier specified in the AFTER argument.

       Specifying PUBLIC is equivalent to a wildcard specification of
       all user identifiers.

    o  In the POSITION argument, the integer specifies the earliest
       relative position in the ACL of the entry to be modified or
       created.

       Starting with the position specified by the POSITION argument,
       SQL searches the entries in the ACL. If an entry has an
       identifier that matches the identifier specified by the
       TO clause of the GRANT statement, SQL creates a new entry
       that contains only those privileges specified in the GRANT
       statement. SQL retains only the entry appearing first in the
       ACL, and deletes any entries with duplicate identifiers.

       If none of the entries has an identifier that matches the
       identifier specified by the TO clause of the GRANT statement,
       SQL creates a new entry for that identifier at the relative
       position specified in the POSITION argument (even if an entry
       before the position at which SQL began its search had an
       identifier that matched).

       If you specify a position higher than the number of entries in
       the list, SQL places the entry last in the ACL. For example,
       if you specify position 12 and there are only 10 entries in
       the list, the new entry is placed in position 11 and given
       that position number.

    o  If you omit the AFTER or POSITION argument, SQL searches
       the entire ACL for an identifier list that matches the one
       specified in the TO clause of the GRANT statement. If it finds
       a match, it modifies the ACL entry by adding those privileges
       specified in the privilege list that are not already present.
       If there is no match, SQL creates a new entry at the beginning
       of the ACL.
Close Help