sql-update Flashcards
1
Q
How do you update rows in a database table?
A
UPDATE “tableName”
SET “columnName” = ‘newDataInsert’
WHERE “row” = ‘valueYouAreQueryingFor’
RETURNING *;
2
Q
Why is it important to include a where clause in your update statements?
A
because without the WHERE clause it would update every row in the table