|
REVOKE deletes user IDs and removes permissions to specific users in a secured database. You can use the REVOKE statement to revoke CREATE TABLE, CREATE VIEW, and CREATE PROCEDURE privileges.
REVOKE CREATETAB | CREATEVIEW | CREATESP FROM public-or-user- group-name [ , public-or-user-group-name ]... REVOKE LOGIN FROM user-name [ , user-name ]... REVOKE table-privilege ON < * | table-name[ owner-name ]>table-privilege ::= ALLtable-name ::= [database-name.]user-defined table name database-name ::= name of the database to which the table belongs public-or-user-group-name ::= PUBLIC | user-group-name user-group-name ::= user-name | group-name user-name ::= user-defined-name group-name ::= user-defined-name| SELECT [ ( column-name [ , column-name ]... ) ] | UPDATE [ ( column-name [ , column-name ]... ) ] | INSERT [ ( column-name [ , column-name ]... ) ] | DELETE | ALTER | REFERENCES
The following table shows the syntax for a given action:
|
To REVOKE Privileges For This Action
|
Use This Syntax with REVOKE
|
|---|---|
|
CREATE TABLE
|
CREATETAB
|
|
CREATE VIEW
|
CREATEVIEW
|
|
CREATE PROCEDURE
|
CREATESP
|
The following statement revokes all these privileges from dannyd for table Class.
The following statement revokes all privileges from dannyd and travisk for table Class.
The following statement revokes DELETE privileges from dannyd and travisk for table Class.
The following example revokes INSERT rights from keithv and miked for table Class.
The following example revokes INSERT rights from keithv and brendanb for table Person and columns First_name and Last_name.
The following statement revokes ALTER rights from dannyd from table Class.
The following example revokes SELECT rights from dannyd and travisk on table Class.
The following statement revokes SELECT rights from dannyd and travisk in table Person for columns First_name and Last_name.
The following example revokes UPDATE rights from dannyd and travisk for table Person.
The following example revokes CREATE VIEW privileges from user1.
|
Chapter contents
Prev topic: RESTRICT
|