Bird
0
0

Which of the following is the correct SQL command to enable the uuid-ossp extension in PostgreSQL?

easy📝 Syntax Q12 of 15
PostgreSQL - Advanced Features
Which of the following is the correct SQL command to enable the uuid-ossp extension in PostgreSQL?
ACREATE EXTENSION uuid-ossp;
BENABLE EXTENSION uuid-ossp;
CINSTALL EXTENSION uuid-ossp;
DADD EXTENSION uuid-ossp;
Step-by-Step Solution
Solution:
  1. Step 1: Recall the syntax to enable extensions

    In PostgreSQL, extensions are enabled using the command CREATE EXTENSION extension_name;.
  2. Step 2: Verify the correct command for uuid-ossp

    The correct command is CREATE EXTENSION uuid-ossp;. Other options are invalid SQL syntax.
  3. Final Answer:

    CREATE EXTENSION uuid-ossp; -> Option A
  4. Quick Check:

    Enable extension = CREATE EXTENSION [OK]
Quick Trick: Use CREATE EXTENSION to enable PostgreSQL extensions [OK]
Common Mistakes:
  • Using ENABLE or INSTALL instead of CREATE
  • Forgetting the semicolon at the end
  • Trying to add extension with ADD keyword

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PostgreSQL Quizzes