April 2017
Beginner to intermediate
360 pages
9h 35m
English
Let's say that dave has second thoughts and no longer wishes to have starred alice's status update. We can just as easily remove his name from the list:
UPDATE "user_status_updates" SET "starred_by_users" = "starred_by_users" - {'dave'} WHERE "username" = 'alice' AND "id" = 76e7a4d0-e796-11e3-90ce-5f98e903bf02;
This is identical to our previous query, except that we use a - operator to indicate removal rather than a + operator to indicate addition.
Read now
Unlock full access