Modern QA2026Verify Default Values
Log inJoin
6 / 20 · Book 15 · Your First SELECT -- Reading the Source of Truth← prev⊞ allnext →Get the book →

1.6Verify Default Values

When your application creates a record without specifying every field, the database should fill in sensible defaults.

-- Check that defaults are applied on creation
SELECT role, active, email_verified, created_at, updated_at
FROM users
WHERE email = 'newuser@test.com';
-- Expected: role='viewer', active=true, email_verified=false,
-- created_at is recent, updated_at equals created_at