Home »
MCQs »
SQL MCQs »
SQL Database MCQs
Which syntax is correct for RENAME DATABASE in SQL?
7. Which syntax is correct for RENAME DATABASE in SQL?
- 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: D) ALTER DATABASE old_database_name MODIFY NAME = new_database_name;
Explanation:
ALTER DATABASE old_database_name MODIFY NAME = new_database_name; syntax is used to Rename Database in SQL.