Jump to content
Sign in to follow this  
aleksanteri

renaming tables

Recommended Posts

Is there a simple way to rename a table? Something like:

RENAME TABLE COMMENT TO COMMENTS

or something like that? :)

Share this post


Link to post
Share on other sites

Why not just drop the old table and query in the new one? If the table doesn't have too many fields it would take just a few seconds.

Share this post


Link to post
Share on other sites

But all data in it will be lost. There is a valid way of renaming tables though. Like this:

ALTER TABLE [i]tablename[/i] RENAME [i]newtablename[/i]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×