Validate default values on insert
Easy30 pts~12 min
- DEFAULT constraints
- INSERT verification
Practice app · Acme Commerce DB
A real SQL database (SQLite engine) seeded with an e-commerce and HR dataset, with schema browser and query runner.
Your starter code already declares TEST_URL — never hardcode a host.
Objective
Insert a customer without status or loyalty_points and verify the schema defaults ('active' and 0) were applied.
Your task
- 1Insert into customers only name 'Default Check', email 'defaults@example.com', country 'USA', created_at '2025-06-01'.
- 2Do not list status or loyalty_points in the column list.
- 3Verify: SELECT status, loyalty_points FROM customers WHERE email = 'defaults@example.com'.
Acceptance criteria
- The row exists with the default status and loyalty points
- The last result set is ('active', 0)
- The INSERT does not supply status or loyalty_points
Constraints
- Every run starts from a freshly seeded database, so your script must include its own setup statements.
- Only the last result set of your script is compared, so finish with the verification query.
SQL (SQLite engine) · Database Testing · Data validation basics