Verwenden Sie die Aggregatfunktion bool_or()
.
SELECT bool_or(column_a) AS column_a
, bool_or(column_b) AS column_b
, bool_or(column_c) AS column_c
FROM tbl
WHERE id IN (1,2);
Das Handbuch:
Verwenden Sie die Aggregatfunktion bool_or()
.
SELECT bool_or(column_a) AS column_a
, bool_or(column_b) AS column_b
, bool_or(column_c) AS column_c
FROM tbl
WHERE id IN (1,2);
Das Handbuch: