The Panorama beta now lets you code SET column = DEFAULT in an UPDATE statement.
"So what?" you say? Well, let's say you write some code that resets a column to have the default value as defined for that column in the original CREATE TABLE.
Now let's suppose the DEFAULT is changed via ALTER TABLE... if you had used the SET column = DEFAULT in your UPDATE you don't have to fix anything.
Can I have another "Woohoo!" please?
CREATE TABLE t (
pkey INTEGER NOT NULL PRIMARY KEY,
data INTEGER NOT NULL DEFAULT '1' );
INSERT t VALUES ( 1, DEFAULT );
INSERT t VALUES ( 2, DEFAULT );
UPDATE t SET data = 98 WHERE pkey = 1;
UPDATE t SET data = 99 WHERE pkey = 2;
UPDATE t SET data = DEFAULT WHERE pkey = 1;
ALTER TABLE t ALTER data DEFAULT 2;
UPDATE t SET data = DEFAULT WHERE pkey = 2;
SELECT * FROM t ORDER BY pkey;