HPlogo ALLBASE/SQL Reference Manual > Chapter 11 SQL Statements E - R

RENAME TABLE

MPE documents

Complete PDF
Table of Contents
Index

E0300 Edition 9 ♥
E0399 Edition 8
E0897 Edition 7

The RENAME TABLE statement defines a new name for an existing table in the DBEnvironment.

Scope


Application Programs

SQL Syntax



  RENAME TABLE [Owner.]TableName TO NewTableName

Parameters


[Owner.]TableName

designates the table to be renamed.

NewTableName

is the new table name.

Description


  • All indexes, columns, default columns, constraints, referential authorization, rules, and user authorities tables dependent on a renamed table will be renamed.

  • When using RENAME command, data and grants made for tables are carried forward for the new name. No unload, load data, or recreating index is necessary.

  • All views dependent on a renamed table will be dropped.

  • If a table has check constraints, then that table cannot be renamed.

Authorization


You must have DBA authority to use this statement.

Example



   RENAME TABLE PurchDB.Parts to NewParts;




RENAME COLUMN


RESET