Bird
0
0

You want to name a CHECK constraint on the Age column in the Employees table to ensure age is at least 18. Which is the best constraint name following conventions?

hard📝 schema Q8 of 15
SQL - Table Constraints
You want to name a CHECK constraint on the Age column in the Employees table to ensure age is at least 18. Which is the best constraint name following conventions?
ACK_Employees_Age_Min18
BCheckAge
CEmployeesAgeCheck
DAgeCheckConstraint
Step-by-Step Solution
Solution:
  1. Step 1: Understand naming conventions for CHECK constraints

    CHECK constraints often start with CK, followed by table and column names, and optionally a description.
  2. Step 2: Evaluate options for clarity and convention

    CK_Employees_Age_Min18 follows the CK prefix, table name, column name, and describes the rule clearly.
  3. Final Answer:

    CK_Employees_Age_Min18 -> Option A
  4. Quick Check:

    CK prefix + table + column + rule = A [OK]
Quick Trick: Use CK prefix for check constraints [OK]
Common Mistakes:
MISTAKES
  • Using vague or generic names
  • Ignoring prefix conventions
  • Not including table or column names

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SQL Quizzes