HPlogo ALLBASE/SQL Reference Manual: HP 9000 Computer Systems > Chapter 11 SQL Statements E - R

RENAME TABLE

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

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;
Feedback to webmaster