Update queries (#5143)

* Update index.md

added correct syntax for renaming table or column

* Update src/data/roadmaps/sql/content/102-ddl/index.md

* Update src/data/roadmaps/sql/content/102-ddl/index.md

* Update src/data/roadmaps/sql/content/102-ddl/index.md

* Update src/data/roadmaps/sql/content/102-ddl/index.md

* Update src/data/roadmaps/sql/content/102-ddl/index.md

---------

Co-authored-by: Kamran Ahmed <kamranahmed.se@gmail.com>
pull/5651/head
Ashutosh Kumar 7 months ago committed by GitHub
parent f1fbca6fc9
commit db4b2487f5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 8
      src/data/roadmaps/sql/content/102-ddl/index.md

@ -35,7 +35,13 @@ Data Definition Language (DDL) is a subset of SQL. Its primary function is to cr
5. `RENAME`: This is used to rename an object in the database. 5. `RENAME`: This is used to rename an object in the database.
```sql ```sql
RENAME TABLE old_table_name TO new_table_name; -- To rename a table
ALTER TABLE table_name
RENAME TO new_table_name;
-- To rename a column
ALTER TABLE table_name
RENAME COLUMN old_column_name TO new_column_name;
``` ```
Remember: In DDL operations, `COMMIT` and `ROLLBACK` statement cannot be performed because the MySQL engine automatically commits the changes. Remember: In DDL operations, `COMMIT` and `ROLLBACK` statement cannot be performed because the MySQL engine automatically commits the changes.

Loading…
Cancel
Save