Collections:
Rename an Existing Table in MySQL
How To Rename an Existing Table in MySQL?
✍: FYIcenter.com
If you want to rename an existing table, you can use the "ALTER TABLE ... RENAME TO" statement. The tutorial script below shows you a good example:
mysql> ALTER TABLE tip RENAME TO faq; Query OK, 0 rows affected (0.01 sec) mysql> SELECT * FROM faq; +----+-------------+-------------------------+--------+ | id | title | description | author | +----+-------------+-------------------------+--------+ | 1 | Learn MySQL | Visit dev.fyicenter.com | NULL | +----+-------------+-------------------------+--------+ 1 row in set (0.00 sec)
⇒ Drop an Existing Table in MySQL
⇐ Rename an Existing Column in a Table in MySQL
2018-02-14, 2617🔥, 0💬
Popular Posts:
How To Use DATEADD() Function in SQL Server Transact-SQL? DATEADD() is a very useful function for ma...
What Privilege Is Needed for a User to Delete Rows from Tables in Another Schema in Oracle? For a us...
What Are the Differences between BINARY and VARBINARY in MySQL? Both BINARY and VARBINARY are both b...
How To Locate and Take Substrings with CHARINDEX() and SUBSTRING() Functions in SQL Server Transact-...
What Are the Differences between DATE and TIMESTAMP in Oracle? The main differences between DATE and...