SQL - Table ConstraintsWhich statement about composite primary keys is TRUE?AThey can consist of one or more columnsBThey allow NULL values in any of the key columnsCThey enforce uniqueness across the combination of columnsDThey automatically create foreign keys in other tablesCheck Answer
Step-by-Step SolutionSolution:Step 1: Check NULL allowance in primary keysPrimary keys do not allow NULL values in any column.Step 2: Understand uniqueness enforcementComposite primary keys enforce uniqueness across the combined columns, not individually.Final Answer:They enforce uniqueness across the combination of columns -> Option CQuick Check:Composite keys = Unique combination [OK]Quick Trick: Composite keys enforce uniqueness on combined columns [OK]Common Mistakes:MISTAKESBelieving primary keys can have NULLsThinking composite keys create foreign keys automaticallyAssuming composite keys can be just one column
Master "Table Constraints" in SQL9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More SQL Quizzes Aggregate Functions - AVG function - Quiz 2easy LEFT and RIGHT JOIN - Why outer joins are needed - Quiz 5medium Set Operations - Set operation column matching rules - Quiz 14medium Set Operations - UNION ALL with duplicates - Quiz 6medium Subqueries - Nested subqueries - Quiz 7medium Subqueries - Subquery with IN operator - Quiz 5medium Subqueries - Subquery with IN operator - Quiz 14medium Subqueries - Subquery in WHERE clause - Quiz 2easy Table Constraints - NOT NULL constraint - Quiz 10hard Views - Querying through views - Quiz 8hard