Are you

SQL RENAME TABLE


Database administrators and users may want to change the name of a table in a SQL database in order to give it a more relevant name in some cases. By using the RENAME TABLE and ALTER TABLE statements in Structured Query Language, any database user can quickly modify the name.

The RENAME TABLE and ALTER TABLE syntax can be used to change the table's name.

SQL syntax of ALTER TABLE statement

RENAME old_table _name To new_table_name ;

Example:

RENAME Cars To Car_Details ;

SQL syntax of ALTER TABLE statement

ALTER TABLE old_table_name RENAME TO new_table_name;

Example:

ALTER TABLE Cars RENAME TO Car_Details ;

Next

Courses