changing database table name

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
mickd
Forum Contributor
Posts: 397
Joined: Tue Jun 21, 2005 9:05 am
Location: Australia

changing database table name

Post by mickd »

Hey,

is it possible to rename a database table name without dropping it, recreating it and readding all its previous entries?

Thanks.
printf
Forum Contributor
Posts: 173
Joined: Wed Jan 12, 2005 5:24 pm

Post by printf »

Something like...

Code: Select all

ALTER TABLE old_table_name RENAME new_table_name;

pif!
mickd
Forum Contributor
Posts: 397
Joined: Tue Jun 21, 2005 9:05 am
Location: Australia

Post by mickd »

Ah, cool thanks.

Got to remember to rt_m.
Post Reply