To create a database only if it doesn’t already exist, which clause is used?

To create a database only if it doesn’t already exist, which clause is used?
A. IF EXISTS
B. IF NOT EXISTS
C. CREATE EXISTS
D. EXISTS IF
 
Answer: b
Explanation: The ‘CREATE DATABASE’ statement supports many optional values. To create a database named ‘my_db’ only if it doesn’t already exist, we write ‘CREATE DATABASE IF NOT EXISTS my_db’.
 

Tìm kiếm

Back
Top