Whats the difference between alter table and update/set? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Whats the difference between alter table and update/set?

Whats the difference between those commands? Its not doing the same thing?

22nd Aug 2019, 9:18 PM
Nim
2 Answers
+ 3
`ALTER TABLE` changes the table structure, for example you can add a new column called `homeAddress` to your `phoneBook` table. (This affects every row in the table, past, present and future!) `UPDATE` updates individual rows. You can change every Marcus to Joseph for example. But you can not add new columns. It's more like a `DELETE FROM` or even a `SELECT`.
22nd Aug 2019, 11:25 PM
Schindlabua
Schindlabua - avatar
+ 1
Oh now i understand it much better, thank you so much!
22nd Aug 2019, 11:32 PM
Nim