db.l3.ai

Play

lessons

what-changed-in-19

editor

engine: not started

results

Run a query to see rows here.

check

Upsert

INSERT ... ON CONFLICT handles a duplicate key in the same statement. DO UPDATE can read the rejected row as EXCLUDED.

task

A product with sku 'TENT-9' may already exist. Insert it (product_id 999, name 'Test', category 'tents', price 9900) or, if the sku exists, only set its price_cents to 9900.

hints