Database Tutorial

Course Tutorial Site

Site Admin

RENAME Statement

without comments

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.

RENAME statement

Oracle

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

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.

SQL Server

Written by michaelmclaughlin

September 22nd, 2009 at 11:32 pm

Posted in

Leave a Reply