AS SELECT
FROM job_history;
PURGE RECYCLEBIN;
AS SELECT
FROM job_history;
DROP TABLE job_history;
GROUP BY e.employee_id);
EMPLOYEE_ID BONUS
----------- ----------
153 100
154 100
155 100
156 100
158 100
159 100
160 100
161 100
163 100
ON (D.employee_id = S.employee_id)
EMPLOYEE_ID BONUS
----------- ----------
153 180
154 175
155 170
159 180
160 175
161 170
179 620
173 610
165 680
166 640
164 720
172 730
167 620
171 740
Examples
Revoking a System Privilege from a User: Example The following statement revokes
the DROP ANY TABLE system privilege from the users hr and oe:
The users hr and oe can no longer drop tables in schemas other than their own.
Revoking a Role from a User: Example The following statement revokes the
role dw_manager from the user sh:
REVOKE dw_manager
FROM sh;
Revoking a System Privilege from a Role: Example The following statement revokes
the CREATE TABLESPACE system privilege from the dw_manager role:
FROM dw_manager;
Revoking a Role from a Role: Example To revoke the role dw_user from the role dw_manager,
issue the following statement:
REVOKE dw_user
FROM dw_manager;
Revoking an Object Privilege from a User: Example You can grant DELETE, INSERT, SELECT,
and UPDATE privileges on the table orders to the user hr with the following statement:
GRANT ALL
ON orders TO hr;
To revoke the DELETE privilege on orders from hr, issue the following statement:
REVOKE DELETE
Revoking All Object Privileges from a User: Example To revoke the remaining privileges
on orders that you granted to hr, issue the following statement:
REVOKE ALL
Revoking Object Privileges from PUBLIC: Example You can grant SELECT and UPDATE privileges
on the view emp_details_view to all users by granting the privileges to the role PUBLIC:
ON emp_details_view TO public;
The following statement revokes UPDATE privilege on emp_details_view from all users:
REVOKE UPDATE
Users can no longer update the emp_details_view view, although users can still query it.
However, if you have also granted the UPDATEprivilege on emp_details_view to any users, either
directly or through roles, then these users retain the privilege.
Revoking an Object Privilege on a Sequence from a User: Example You can grant the
user oe the SELECT privilege on the departments_seq sequence in the schema hr with the
following statement:
GRANT SELECT
ON hr.departments_seq TO oe;
To revoke the SELECT privilege on departments_seq from oe, issue the following statement:
REVOKE SELECT
However, if the user hr has also granted SELECT privilege on departments to sh, then sh can still
use departments by virtue of hr's grant.
Revoking an Object Privilege with CASCADE CONSTRAINTS: Example You can grant to oe the
privileges REFERENCES and UPDATE on the employees table in the schema hr with the following
statement:
ON hr.employees TO oe;
The user oe can exercise the REFERENCES privilege to define a constraint in his or her
own dependent table that refers to the employeestable in the schema hr:
(dependno NUMBER,
dependname VARCHAR2(10),
employee NUMBER
You can revoke the REFERENCES privilege on hr.employees from oe by issuing the following
statement that contains the CASCADECONSTRAINTS clause:
REVOKE REFERENCES
ON hr.employees
FROM oe
CASCADE CONSTRAINTS;
Revoking oe's REFERENCES privilege on hr.employees causes Oracle Database to drop
the in_emp constraint, because oe required the privilege to define the constraint.
However, if oe has also been granted the REFERENCES privilege on hr.employees by a user other
than you, then the database does not drop the constraint. oe still has the privilege necessary for the
constraint by virtue of the other user's grant.
Revoking an Object Privilege on a Directory from a User: Example You can revoke
the READ object privilege on directory bfile_dir from hr by issuing the following statement:
Revoke Operations that Use GRANT ANY OBJECT PRIVILEGE: Example Suppose that the
database administrator has granted GRANT ANY OBJECT PRIVILEGE to user sh. Now suppose that
user hr grants the update privilege on the employees table to oe:
CONNECT hr/hr
This grant gives user oe the right to pass the object privilege along to another user:
CONNECT oe/oe
User sh, who has the GRANT ANY OBJECT PRIVILEGE, can now act on behalf of user hr and revoke
the update privilege from user oe, because oe was granted the privilege by hr:
CONNECT sh/sh
ROLLBACK;
ROLLBACK WORK
FORCE '25.32.87';
UPDATE employees
SAVEPOINT banda_sal;
UPDATE employees
SAVEPOINT greene_sal;
UPDATE employees
COMMIT;