Revoke privileges on a specific table from a user or role

I have described how to grant privileges to a user or role. This is the opposite and will show how to revoke privileges.

This example revokes the ability to select on table called test_table from the user called JSMITH.

REVOKE SELECT ON test_table FROM JSMITH;

Here is the full list of possible privileges for an Oracle table.

Privilege Description
Select Ability to query the table.
Insert Ability to add new rows to the table.
Update Ability to update rows in the table.
Delete Ability to delete rows from the table.
References Ability to create a constraint that refers to the table.
Alter Ability to change the table definition.
Index Ability to create an index on the table.

Grant privileges on an Oracle table to a specific user or role

When you create an object, you have full privileges over that object. If you want to grant specific privileges to another user, or role, then this should explain how to do it.

This example grants the ability to select on a table called TEST_TABLE to the user called JSMITH:

GRANT SELECT ON TEST_TABLE TO JSMITH;

Here is the full list of possible privileges for an Oracle table.

Privilege Description
Select Ability to query the table.
Insert Ability to add new rows to the table.
Update Ability to update rows in the table.
Delete Ability to delete rows from the table.
References Ability to create a constraint that refers to the table.
Alter Ability to change the table definition.
Index Ability to create an index on the table.

Alternatively you could grant full privileges by using the following:

GRANT ALL ON test_table TO JSMITH;

You can of course do the opposite and revoke privileges.