blob: 3fca2fb41ac71c0cea4ddbf35d13026fa46a34ff (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
--
-- UPDATE ... SET <col> = DEFAULT;
--
CREATE TABLE update_test (
a INT DEFAULT 10,
b INT
);
INSERT INTO update_test VALUES (5, 10);
INSERT INTO update_test VALUES (10, 15);
SELECT * FROM update_test;
a | b
----+----
5 | 10
10 | 15
(2 rows)
UPDATE update_test SET a = DEFAULT, b = DEFAULT;
SELECT * FROM update_test;
a | b
----+---
10 |
10 |
(2 rows)
DROP TABLE update_test;
|