Cry MySQL How to...

Rename a database table


To rename a MySQL database table use:

alter table old_table_name rename to new_table_name

where 'old_table_name' is the original name of the table and 'new_table_name' is the desired new name.


These notes have been tested against MySQL version 5.1, and may apply to other versions as well.



About the author: is a dedicated software developer and webmaster. For his day job he develops websites and desktop applications as well as providing IT services. He moonlights as a technical author and consultant.