About 228,000 results
Open links in new tab
  1. MySQL RENAME TABLE Statement - GeeksforGeeks

    Jun 17, 2024 · The MySQL RENAME TABLE statement is a simple yet powerful command that allows you to change the name of an existing table in your database. This can be useful for various reasons, such as updating table names to better reflect their content or restructuring your database without losing any data.

  2. MySQL :: MySQL 8.4 Reference Manual :: 15.1.36 RENAME TABLE

    RENAME TABLE renames one or more tables. You must have ALTER and DROP privileges for the original table, and CREATE and INSERT privileges for the new table. For example, to rename a table named old_table to new_table, use this statement: RENAME TABLE old_table TO …

  3. database - Rename a table in MySQL - Stack Overflow

    Sep 29, 2012 · Rename table Syntax The syntax to rename a table in MySQL is: ALTER TABLE table_name RENAME TO new_table_name; Example Let's look at an example that shows how to rename a table in MySQL using the ALTER TABLE statement. or example: ALTER TABLE contacts RENAME TO people;

  4. MySQL RENAME TABLE Statement - MySQL Tutorial

    To rename one or more tables, you can use the RENAME TABLE statement as follows: TO new_table_name; Code language: SQL (Structured Query Language) (sql) In this syntax: table_name: This is the name of the table that you want to rename. new_table_name: This is the new table name.

  5. How to Rename a Table in MySQL - PopSQL

    Discover two MySQL methods for renaming tables: ALTER TABLE and RENAME TABLE. While ALTER TABLE employs a straightforward syntax, RENAME TABLE offers enhanced flexibility, allowing you to rename multiple tables in a single statement.

  6. ALTER (RENAME) in SQL - GeeksforGeeks

    Apr 14, 2025 · In this article, we will explain how to rename tables and columns in SQL using the ALTER TABLE command, along with practical examples. What is ALTER Command in SQL? The ALTER TABLE command in SQL allows us to modify the structure of an existing table.

  7. SQL RENAME TABLE - GeeksforGeeks

    Jan 13, 2025 · In SQL, the RENAME TABLE statement is used to change the name of an existing table. This operation is typically performed when a table's name no longer reflects the data it contains, or to make the table name more descriptive or organized.

  8. MYSQLALTER, DROP, RENAME, MODIFY - Guru99

    Jul 17, 2024 · The rename command has the following basic syntax. RENAME TABLE `current_table_name` TO `new_table_name`; Let’s suppose that we want to rename the movierentals table to movie_rentals, we can use the script shown below to achieve that.

  9. How do I rename a MySQL database (change schema name)?

    For scripting in a shell, you can use either of the following: do mysql -u username -ppassword -sNe "rename table old_db.$table to new_db.$table"; done. OR. Notes: There is no space between the option -p and the password. If your database has no password, remove the -u username -ppassword part.

  10. MySQL RENAME TABLE

    MySQL allows us to change the name of one or more tables using the MySQL RENAME TABLE statement. To rename a Temporary table, you can use ALTER TABLE statement.

  11. Some results have been removed
Refresh