Database

Alter Table Statement in MySQL : How to Rename Table

rename-table
mm
Written by Santosh Prasad

In this article I will show you how to rename table in MySQL.

RENAME TABLE IN MYSQL

Syntax

Follow the syntax to rename a table in MySQL.

ALTER TABLE table_name
  RENAME TO new_table_name;

Where;

  • table_name : Name of the table to rename.
  • new_table_name : New table name to use.

Example

Let’s see how we can rename the table in MySQL using Alter Table Statement.

ALTER TABLE contacts
  RENAME TO people;

This ALTER TABLE example will rename the contacts table to people.

Thank you! for visiting Look Linux.

If you find this tutorial helpful please share with your friends to keep it alive. For more helpful topic browse my website www.looklinux.com. To become an author at Look Linux Submit Article. Stay connected to Facebook.

About the author

mm

Santosh Prasad

Hi! I'm Santosh and I'm here to post some cool article for you. If you have any query and suggestion please comment in comment section.

Leave a Comment