Skip to main content
PProfileMatch
← Path

SQL Fundamentals · SQL INSERT, UPDATE, DELETE, Constraints and Primary and Foreign Keys

0 XP
  1. 1 current stop: learning
  2. 2 upcoming
  3. 3 upcoming
  4. 4 upcoming
  5. 5 upcoming

Finish after stop 5

Stop 1 of 5 · Nursery gate: the rulebook

Trick to keep in mind+3 XP

NOT NULL asks 'is there a value?'; CHECK asks 'is it a good value?'

Each constraint guards one kind of mistake. NOT NULL only insists that something is supplied, so a price of 0 satisfies it. A CHECK evaluates a condition on the row, for example 'price greater than zero', and rejects a value that is present but unacceptable. UNIQUE and keys guard against duplicates and dangling links.

Read it once, then a question tests whether the trick stuck.