Chapter 3 DBMS Reference Guide


Rename

Statement for renaming a table. If Rename is empty, the modify database process drops the foreign key constraints, creates a new table with the new name, inserts the rows from the old table in the new table, and creates the indexes and constraints on the new table using temporary tables.

Used in the database modification script when a table has been renamed.

Example

In Sybase Adaptive Server Enterprise 11:

sp_rename %OLDTABL%, %NEWTABL%

The %OLDTABL% variable is the code of the table before it was renamed. The %NEWTABL% variable is the new code of the table.

 


Copyright (C) 2005. Sybase Inc. All rights reserved.