8. SQL Statements : GRANT (privilege) : Object Privileges : TABLE Privileges
 
Share this page                  
TABLE Privileges
Table privileges control access to tables and views. By default, only the owner of the table has privileges for the table. To enable others to access the table, the owner must grant privileges to specific authorization IDs or to public. Table privileges must be granted explicitly.
Valid table privileges are:
SELECT
Allows grantee to select rows from the table.
INSERT
Allows grantee to add rows to the table.
UPDATE
Allows grantee to change existing rows. To limit the columns that the grantee can change, specify a list of columns to allow or a list of columns to exclude.
To grant the privilege for specific columns, use the following syntax after the UPDATE keyword in the GRANT statement:
(column_name {, column_name)
To grant the privilege for all columns except those specified, use the following syntax after the UPDATE keyword in the GRANT statement:
EXCLUDING (column_name {, column_name})
If the column list is omitted, update privilege is granted to all columns of the table or, for views, all updatable columns.
DELETE
Allows grantee to delete rows from the table.
REFERENCES
Allows grantee to create referential constraints that reference the specified tables and columns. For details about referential constraints, see Create Table (see CREATE TABLE). A list of columns to allow or to exclude can optionally be specified.
To grant the privilege for specific columns except those specified, use the following syntax after the REFERENCES keyword in the GRANT statement:
(column_name {, column_name})
To grant the privilege for all columns except those specified, use the following syntax after the REFERENCES keyword in the GRANT statement:
EXCLUDING (column_name {, column_name})
If the column list is omitted, references privilege is granted to all columns of the table. The references privilege cannot be granted on a view.
COPY_INTO
Allows the grantee to issue the COPY...INTO statement on a table. This privilege can be granted on tables only.
COPY_FROM
Allows the grantee to issue the COPY...FROM statement on a table. This privilege can be granted on tables only.
ALL [PRIVILEGES]
Grants the subset of select, insert, update, delete, and references privileges for which the grantor has GRANT OPTION. For details, see Grant All Privileges Option (see GRANT ALL PRIVILEGES Option).
When privileges are granted against a table, the date and timestamp of the specified table is updated, and the DBMS Server recreates query plans for repeat queries and database procedures that see the specified table.