Search⌘ K
AI Features

Challenge: Testing in PostgreSQL

Explore writing unit tests in PostgreSQL by creating scripts that verify if specific tables and columns exist. Learn to run these tests using pg_prove for interactive SQL testing and validating database structures.

Problem statement

Write and run two tests using a command. If you’re stuck, see the given hints.

Expected output

If the query is run successfully, the output will be something like the following:

 ...