Home » MYSQL » Create Database » Question
  1. To create a database only if it doesn’t already exist, which clause is used?
    1. EXISTS IF
    2. CREATE EXISTS
    3. IF NOT EXISTS
    4. IF EXISTS
    5. None of these
Correct Option: C

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’.



Your comments will be displayed only after manual approval.