SQL-Update Flashcards

1
Q

How do you update rows in a database table?

A

To update rows you have to use the UPDATE statement followed by the name of the table you want to update in double quotes. Followed by the SET statement with the column name equal to the new value you want to change it to.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Why is it important to include a where clause in your update statements?

A

If you do not include a WHERE clause you run the risk of updating all the values for one column accidentally

How well did you know this?
1
Not at all
2
3
4
5
Perfectly