Boolean Type

Data 360 Query Guide, mirrored from developer.salesforce.com: **Applies to:** ✅ Data 360 SQL ✅ Tableau Hyper API

markdownreferencev1R540-HZ94guide: data-cloud-query-guidestage: referencetrust: officialsource: developer.salesforce.comservice: data360interface: sqlBoolean TypeData 360Data CloudData 360 Query Guide

Created 23 Oct 2026 · Modified 23 Oct 2026 · 1 version

Mirror of <https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/boolean.html> (Salesforce, Data 360 Query Guide), read 2026-10-23. Salesforce's own page is the authority; this copy exists because that site refuses non-browser readers.

Boolean Type

Applies to: ✅ Data 360 SQL ✅ Tableau Hyper API

The boolean type can have three states: true, false, and unknown. The SQL NULL value represents unknown. You can represent boolean constants in SQL queries with the SQL key words TRUE, FALSE, and NULL.

A comparison or a similar function call can result in a boolean value. You can also use logical operators to combine boolean values.

To parse a boolean from a string, use one of these strings.

TrueFalse
truefalse
yesno
onoff
10
tf
yn

Data 360 SQL ignores leading or trailing whitespace and isn’t case-sensitive. To use the string representations, provide the generic string-literal constant syntax. For example, ‘yes’::boolean.

Data 360 SQL can’t automatically infer the type of NULL literals. To prevent errors, explicitly cast NULL to boolean. For example, NULL::boolean.

Converting a boolean to a string always emits either true or false, as shown in this example.

The table test1 is defined as:

ab
truesic est
falsenon est

Column a is a boolean value and column b is a text value.

Results:

ab
truesic est
falsenon est

Results:

ab
truesic est

Read this document as markdown — the same bytes an agent receives.