April 2026
Intermediate
1009 pages
34h 15m
English
The SQL command for updating data is called UPDATE <table name>. Then enter the keyword SET and the values to be changed in the form <column>=<value>. But this would make the changes in all table rows. You therefore usually need an additional WHERE clause. Here is an example in which Tobias’s (fictitious) email address is changed:
UPDATE entry SET name = 'Tobi', email = 'tobi@xy.zzz' WHERE name = 'Tobias' SELECT * FROM entry
|
id |
name |
|
date |
entry |
|---|---|---|---|---|
|
1 |
Christian |
christian@xy.zzz |
2025-01-01 |
A warm welcome! The guestbook is open. |
|
2 |
Tobi |
tobi@xy.zzz |
2025-01-02 |
This isn't exactly the place to be ... |
|
3 |
Christian |
christian@xy.zzz |
2025-01-03 |
There is some truth in that. |
Table ...
Read now
Unlock full access