23.10.2012 Views

Openedge Data Management: SQL Reference - Product ...

Openedge Data Management: SQL Reference - Product ...

Openedge Data Management: SQL Reference - Product ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

ROLLBACK<br />

44<br />

If more than one user grants access to the same table to a user, then all the grantors must<br />

perform a revoke for the user to lose access to the table.<br />

Using the keyword ALL revokes all the privileges granted on the table or view.<br />

FROM PUBLIC<br />

Revokes the specified privileges on the table or view from any user with access to the<br />

system.<br />

RESTRICT | CASCADE<br />

Prompts <strong>SQL</strong> to check to see if the privilege being revoked was passed on to other users.<br />

This is possible only if the original privilege included the WITH GRANT OPTION clause. If<br />

so, the REVOKE statement fails and generates an error. If the privilege was not passed on,<br />

the REVOKE statement succeeds.<br />

If the REVOKE statement specifies CASCADE, revoking the access privileges from a user also<br />

revokes the privileges from all users who received the privilege from that user.<br />

If the REVOKE statement specifies neither RESTRICT nor CASCADE, the behavior is the same<br />

as for CASCADE.<br />

Example In this example, REVOKE is used on INSERT and DELETE privileges:<br />

ROLLBACK<br />

Syntax<br />

REVOKE INSERT ON customer FROM dbuser1 ;<br />

REVOKE DELETE ON cust_view FROM dbuser2 ;<br />

If the username specified in a GRANT DBA or GRANT RESOURCE operation does not already exist,<br />

the GRANT statement creates a row in the SYSDBAUTH system table for the new username. This<br />

row is not deleted by a subsequent REVOKE operation.<br />

Authorization<br />

Must have the DBA privilege or ownership of the table (to revoke privileges on a table). To<br />

revoke audit privileges, the user must have the DBA privilege or AUDIT ADMINISTRATION<br />

WITH GRANT privilege and be the user who granted the audit privilege.<br />

Related statement<br />

GRANT<br />

Ends the current transaction and undoes any database changes performed during the transaction.<br />

ROLLBACK [ WORK ] ;<br />

Notes • Under certain circumstances, <strong>SQL</strong> marks a transaction for abort but does not actually roll<br />

it back immediately. Without an explicit ROLLBACK, any subsequent updates do not take

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!