In SQL, which keyword is used to rename a table?
Correct Answer: B. ALTER TABLE RENAME
The ALTER TABLE RENAME command is used in SQL to rename an existing table. This command modifies the structure of a table, allowing you to change its name without affecting the data it contains. It is a part of the Data Definition Language (DDL) in SQL.
The syntax typically looks like: ALTER TABLE old_table_name RENAME TO new_table_name;. This approach ensures data preservation while changing the table identifier.
Why Other Options are Incorrect:
Discover a range of courses designed to provide you with the knowledge and skills needed to excel in your chosen field.
You don’t need one month to study and pass your test.
With Prepsaret, it takes you a few days to grasp all the concepts needed to pass your exams