Returns true if all non NULL input value are true, otherwise false. If all input values are NULL values, returns NULL.

Syntax

BOOL_AND(<expression>)

Parameters

ParameterDescriptionSupported input types
<expression>The boolean expression used to calculate the resultBOOLEAN

Return Types

BOOLEAN

Example

nametotalprizedollars
The Drift Championship22,048
The Lost Track Showdown5,336
The Acceleration Championship19,274
The French Grand Prix237
The Circuit Championship9,739

We want to check if all tournaments have prize money

SELECT
	BOOL_ALL(totalprizeddollars IS NOT NULL AND totalprizeddollars > 0) as all_have_prizes 
FROM
	tournaments;

Returns

true