db.l3.ai

Play

lessons

what-changed-in-19

editor

engine: not started

results

Run a query to see rows here.

check

ON CONFLICT DO SELECT

Insert a product whose sku exists already. DO SELECT returns the old row and writes nothing. old is NULL only when the row was really inserted.

task

Insert product_id 100000 with the sku of the first product (by product_id); return product_id, name and an inserted flag.

hints