RENAME Statement
This page shows you how to use the RENAME statement. The RENAME statement is a DDL statement. It lets you rename tables, sequence, views, object.
Course Tutorial Site
This page shows you how to use the RENAME statement. The RENAME statement is a DDL statement. It lets you rename tables, sequence, views, object.
You can use the RENAME statement to change a table or view name. Databases support it because the table is truly linked to a numeric identifier in the catalog and its name is only an alias.
You RENAME a table or view, like this:
RENAME chronograph TO watch;
You rename a column with the ALTER statement and MODIFY subclause.
MySQL works like Oracle with this DDL command with one exception. Oracle assumes the first name belongs to a table. MySQL requires you to qualify that you’re renaming a table.
The RENAME statement changes an old table or view name to new one. Databases support it because the table is truly linked to a numeric identifier in the catalog and its name is only an alias.
You RENAME a table or view, like this:
RENAME TABLE chronograph TO watch;
You rename a column with the ALTER statement and CHANGE subclause.
Written by michaelmclaughlin
September 22nd, 2009 at 11:32 pm
Posted in
Copyright © 2012 Michael McLaughlin All rights reserved.
The Journalist template by Lucian E. Marin — Built for WordPress
Array