September 2017
Intermediate to advanced
240 pages
5h 57m
English
You now know the CR parts of CRUD, which leaves the update and delete operations. As with all the other SQL commands, the UPDATE command follows a format similar to DELETE, but it changes the columns in rows instead of deleting them.
ex9.sql
1 UPDATE person SET first_name = "Hilarious Guy" 2 WHERE first_name = "Zed"; 3 4 UPDATE pet SET name = "Fancy Pants" 5 WHERE id=0; 6 7 SELECT * FROM person; 8 SELECT * FROM pet;
In the above code I’m changing my name to “Hilarious Guy,” since that’s more accurate. And to demonstrate my new moniker I renamed my Unicorn to “Fancy Pants.” He loves it.
This shouldn’t be that hard to figure out but, just in case, I’m going ...
Read now
Unlock full access