3. Statements : OpenROAD SQL Statements : Revoke Statement : Parameters—Revoke Statement
 
Share this page                  
Parameters—Revoke Statement
This statement has the following parameters:
privilege
Specifies the privileges to revoke. To revoke all privileges, use all. The privileges must agree with the object_type as follows:
Object Type
Valid Privileges
database (or current installation)
[no]access
[no]connect_time_limit
[no]create_procedure
[no]create_sequence
[no]create_table
[no]db_admin
[no]idle_time_limit
[no]lockmode
[no]query_cost_limit
[no]query_cpu_limit
[no]query_io_limit
[no]query_page_limit
[no]query_row_limit
[no]select_syscat
[no]session_priority
[no[table_statistics
[no]timeout_abort
[no]update_syscat
object_type
Specifies the type of object on which the privileges were granted. Valid object_types are:
database
current installation
object_name
Specifies the name of the table, database procedure, database event, or role on which the privileges were granted.
auth_type
Specifies the type of authorization identifier to which privileges were granted. Auth_type must be user, group, or role. The default is user. More than one auth_type cannot be specified.
auth_id
Specifies the users, groups, or roles from which privileges are being revoked. The auth_ids must agree with the type specified by the auth_type.
For example, if you specify group as auth_type, the auth_id list must be a list of group identifiers. If you specify PUBLIC for the auth_id, you must omit auth_type. You can revoke from users and PUBLIC in the same revoke statement.
Revoking a database privilege makes that privilege on the specified database undefined for the specified grantee (auth_id). If an attempt is made to revoke a privilege that was not granted to a specified auth_id, no changes are made to the privileges of that auth_id.
Privileges granted on specific databases are not affected by revoke...on current installation, and privileges granted on current installation are not affected by revoke...on database. Revoking privileges from PUBLIC does not affect privileges granted to a specific user.
If a privilege was granted using its “no” form (for example, nocreate_table or noquery_io_limit), the same form must be used when revoking the privilege. For example, the following grant prevents a user from creating tables:
grant nocreate_table on database employee
to user karenk;
To remove this restriction:
revoke nocreate_table on database employee
from user karenk;
For more information about privileges, see Grant (privilege) (see Grant (privilege) Statement). For a description of group and role identifiers, and details about privilege dependencies, see the Ingres Database Administrator Guide.
Note:  In some cases granting a database privilege imposes a restriction, and revoking the privilege removes the restriction. For example, grant nocreate_table prevents the user from creating tables.