How to toggle a boolean field by sql in postgresql?
This will do:
SET show = NOT show
so a value of
TRUE
becomes FALSE
,
FALSE
becomes TRUE
,
UNKNOWN
(NULL
) stays UNKNOWN
.
This will do:
SET show = NOT show
so a value of
TRUE
becomes FALSE
,
FALSE
becomes TRUE
,
UNKNOWN
(NULL
) stays UNKNOWN
.