Utilisez la fonction d'agrégation 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);
Le manuel :
Utilisez la fonction d'agrégation 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);
Le manuel :