db.l3.ai

Play

lessons

what-changed-in-19

editor

engine: not started

results

Run a query to see rows here.

check

Exceptions

A PL/pgSQL block can catch an error with an EXCEPTION section. The block's changes are rolled back to the start of the block when it catches.

task

Write safe_div(a int, b int) that returns NULL on division by zero.

hints