SQL UPDATE: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 5: Line 5:


<syntaxhighlight lang='sql'>
<syntaxhighlight lang='sql'>
UPDATE person SET name = 'Binh Ngo Jr.' WHERE id = 1;
UPDATE person SET name = 'Binh Ngo Jr.', city = 'San Francisco' WHERE id = 1;
</syntaxhighlight>
</syntaxhighlight>
:{| class="wikitable" style="text-align: left;"
:{| class="wikitable" style="text-align: left;"

Revision as of 00:15, 23 May 2024

Internal

Overview

UPDATE person SET name = 'Binh Ngo Jr.', city = 'San Francisco' WHERE id = 1;
PostgreSQL MySQL

The UPDATE statement may contain a WHERE clause, that identifies the rows to be modified:

The WHERE Clause