Books
in black and white
Main menu
Share a book About us Home
Books
Biology Business Chemistry Computers Culture Economics Fiction Games Guide History Management Mathematical Medicine Mental Fitnes Physics Psychology Scince Sport Technics
Ads

Teradata RDBMS forUNIX SQL Reference - NCR

NCR Teradata RDBMS forUNIX SQL Reference - NCR, 1997. - 913 p.
Download (direct link): teradataforunix1997.pdf
Previous << 1 .. 171 172 173 174 175 176 < 177 > 178 179 180 181 182 183 .. 241 >> Next


Implicit ownership privileges cannot be revoked.

The REVOKE statement may be in SQL or MONITOR form.

Two forms of REVOKE syntax are described separately on the following pages. A third form, REVOKE LOGON, is discussed in the following section.

REVOKE is flagged as not entry level ANSI when the SQL flagger is enabled.

8-232

Teradata RDBMS for UNIX SQL Reference
Teradata SQL Syntax Guide

REVOKE Statement (SQL)

REVOKE Statement (SQL)

Function

The SQL form of the REVOKE statement rescinds one or more privileges on a database, user, table, view, or macro to a user or group of users.

Syntax

REVOKE

U

GRANT OPTION FOR-

-ALL-

U

E

ALL BUT

PRIVILEGES

I

—p1- operation -

ON A

dbname — dbname.objname -------objname-----

where:

TO

I— FROM —I

FROM

Lall-I

username

PUBLIC

FF07A061

Syntax Element .

Description

GRANT OPTION FOR

When GRANT OPTION FOR is specified, then only the grant authority is removed from the specified rights for the specified grantees.

REVOKE GRANT OPTION FOR revokes the recipient’s right to grant, but does not revoke the stated privileges themselves.

ALL

PRIVILEGES

Revokes from the specified user all privileges, except MONITOR, that may be granted on the specified object, and that are possessed WITH GRANT OPTION by the user executing the REVOKE.

To revoke all of a user’s privileges, including MONITOR, the revoker must execute at least two commands, shown as follows:

REVOKE ALL PRIVILEGES ON object

from username ;

REVOKE MONITOR PRIVILEGES

from username ;

ALL PRIVILEGES means only all database privileges.

If the ALL PRIVILEGES is used, then only the rights possessed with grant authority are revoked from the grantee.

MONITOR PRIVILEGES indicates all monitoring privileges.

ANSI SQL requires ALL to be followed by PRIVILEGES.

Teradata RDBMS for UNIX SQL Reference

8-233
Teradata SQL Syntax Guide

REVOKE Statement (SQL)

Syntax Element ... Description
ALL BUT Revokes all privileges from the specified user, except those listed, that may be granted on the specified object, with the exception of GRANT.
privileges Is one of the following: CHECKPOINT CREATE DATABASE, MACRO, TABLE, USER, CREATE VIEW DATABASE DELETE DROP DATABASE, MACRO, TABLE, USER DROP VIEW DUMP EXECUTE INDEX INSERT MACRO REFERENCES [col_name list or ALL BUT col_name list] RESTORE ROLLBACK DATABASE ROLLFORWARD DATABASE SELECT TABLE UPDATE [col_name list or ALL BUT col_name list] USER VIEW ANSI SQL supports only SELECT, INSERT, UPDATE, DELETE and REFERENCES as privileges. The other privileges are Teradata RDBMS extensions to ANSI SQL. UPDATE and REFERENCES have table and column level options. Refer to the Usage Notes in “GRANT”. Refer also to “Revoking Column Level Rights” in Usage Notes below. ANSI does not support REVOKE on a Database or User, or ALL BUT. These are Teradata RDBMS extensions to ANSI SQL. Any combination of privileges may be specified. However, the user submitting the statement must have all of the specified privileges WITH GRANT OPTION. When specified with the CREATE or DROP privilege, the USER and DATABASE keywords are identical and may be used interchangeably. If the DATABASE, MACRO, TABLE, USER, or VIEW keyword is specified without CREATE or DROP, both CREATE and DROP are revoked.

8-234

Teradata RDBMS for UNIX SQL Reference
Teradata SQL Syntax Guide

REVOKE Statement (SQL)

Syntax Element ... Description
privileges (continued) If CHECKPOINT is specified, the privilege is revoked both for the SQL statement and for the Host Utilities (HUT) command. DUMP and RESTORE revoke the privilege to execute the corresponding HUT command. If RESTORE is revoked, then the privilege to execute the HUT commands ROLLBACK, ROLLFORWARD, and DELETE JOURNAL is also revoked.
ON Introduces the clause that specifies the object-name on which privileges are to be revoked.
dbname Specifies the name of a database or user on which the privileges are to be revoked. All objects in this database or user space are affected.
dbname.objname Specifies the name of the owning database and the name of the object (table, view, or macro) on which privileges are being revoked. Only this object is affected.
objname The name of the table, view, or macro from which privileges are being revoked. The system checks database names before object names; if the object name is not qualified, and if it is the same as a database name, unpredictable results may occur.
TO from Introduces the clause that specifies the recipient of the REVOKE results. For compatibility, ANSI SQL requires the use of FROM.
[ALL] username Identifies the database or user from whom privileges are revoked. Up to 25 names may be specified. ALL username specifies that the privileges are to be granted to or revoked from the named database or user, and every database or user owned by that database or user now and in the future. ALL username is a Teradata RDBMS extension to ANSI SQL.
Previous << 1 .. 171 172 173 174 175 176 < 177 > 178 179 180 181 182 183 .. 241 >> Next