Use UPDATE when an existing database row needs new values. The statement names the table, assigns a column value with SET, and can use WHERE to limit which rows change. section 8.2.4
Updating a haiku
This command adds an attribution prefix to the haiku whose haiku_id is 1: UPDATE haikus SET text = '[By Alice] ' || text WHERE haiku_id = 1;. A following SELECT confirms the changed text.
Treat the condition as an important safety check: it identifies the intended row instead of applying the change broadly. Verify the result with SELECT while developing.


