How to grant the access on tables in Oracle

Grant Statement

Grant statement is used to provide the access to specific users and It allows the user to perform actions on database objects.

Types of privileges given by Grant

  • Update data in a table.
  • Delete records from a table.
  • Select the records from a table,view, or a subset of columns in a table.
  • Insert the data into the table.
  • Create a trigger on a table.
  • Run a specified function or procedure.
  • Use a sequence generator or a user-defined type.
  • Create a foreign key reference to a table.

Syntax of Grant Statement

Here privilege type means SELECT,INSERT,UPDATE or DELETE access to the table. Then we need to specify the table name and the user name who wants the access for this table.

Example for Grant Statement

In this example, we are providing the SELECT and UPDATE access of the Table Customers to the user Bank_Admin.

Check User privileges in Oracle

The above query will return the access details of the user Bank_Admin as below.

List User privileges in Oracle