Home »
MCQs »
SQL MCQs »
SQL Database MCQs
Which syntax is correct for RENAME DATABASE in MySQL?
6. Which syntax is correct for RENAME DATABASE in MySQL?
- RENAME old_database_name TO new_database_name;
- RENAME DATABASE old_database_name TO new_database_name;
- ALTER old_database_name MODIFY NAME = new_database_name;
- ALTER DATABASE old_database_name MODIFY NAME = new_database_name;
Answer: B) RENAME DATABASE old_database_name TO new_database_name;
Explanation:
RENAME DATABASE old_database_name TO new_database_name; syntax is used to Rename Database in MySQL.