background image
<< RENAME statements | Syntax for sequence generators >>

REVOKE statement

<< RENAME statements | Syntax for sequence generators >>
Derby Reference Manual
64
RENAME TABLE statement
RENAME TABLE allows you to rename an existing table in any schema (except the
schema SYS).
To rename a table, you must either be the
database owner
or the table owner.
Syntax
RENAME TABLE table-Name TO
new-Table-Name
If there is a view or foreign key that references the table, attempts to rename it will
generate an error. In addition, if there are any check constraints or triggers on the table,
attempts to rename it will also generate an error.
Example
RENAME TABLE SAMP.EMP_ACT TO EMPLOYEE_ACT
See
ALTER TABLE statement
for more information.
Statement dependency system
The RENAME TABLE statement is not allowed if there are any open cursors that
reference the table that is being altered.
REVOKE statement
Use the REVOKE statement to remove privileges from a specific user or role, or from all
users, to perform actions on database objects. You can also use the REVOKE statement
to revoke a role from a user, from PUBLIC, or from another role.
The following types of privileges can be revoked:
· Delete data from a specific table.
· Insert data into a specific table.
· Create a foreign key reference to the named table or to a subset of columns from a
table.
· Select data from a table, view, or a subset of columns in a table.
· Create a trigger on a table.
· Update data in a table or in a subset of columns in a table.
· Run a specified routine (function or procedure).
· Use a sequence generator or a user-defined type.
The
derby.database.sqlAuthorization
property must be set to
true
before you can use the GRANT statement or the REVOKE statement. The
derby.database.sqlAuthorization
property enables SQL Authorization mode.
You can revoke privileges for an object if you are the owner of the object or the
database
owner
.
The syntax that you use for the REVOKE statement depends on whether you are
revoking privileges to a schema object or revoking a role.
For more information on using the REVOKE statement, see "Using SQL standard
authorization" in the Derby Developer's Guide.
Syntax for tables
REVOKE
privilege-type
ON [ TABLE ] {
table-Name
|
view-Name
} FROM
grantees
Revoking a privilege without specifying a column list revokes the privilege for all of the
columns in the table.