APPX Software Library

Chapter 5: SQL Statements

5.13 RENAME

Description

Renames the specified table name, view name or synonym to the new name specified

Syntax

RENAME [owner_name.] oldname TO [owner_name.] newname ;

Arguments

[owner_name.]

Optional owner-name qualifier for the name. If the owner name is not the same as that of the current user, the current user must have the DBA privilege.

If specified, the owner name must be the same for oldname and newname. In other words, you cannot change the owner of a table, view, or synonym with RENAME.

oldname

Current name of the table, view, or synonym.

newname

New name for the table, view, or synonym.

Example

RENAME sitem TO supplier_item ;

Authorization

The user executing this statement must have any of the following privileges:

  • DBA privilege
  • Ownership of the table/view/synonym.
  • ALTER privilege on the table/view.
SQL Compliance

Extension

Environment

Embedded SQL, interactive SQL, ODBC applications

CREATE TABLE, CREATE VIEW, CREATE SYNONYM