← and operator page · boolean/and/sc_sc/all_four_boolean_combinations
pandas ✅ · DuckDB ✅
the four combinations of two boolean scalars: SC_true and SC_true, SC_true and SC_false, SC_false and SC_true and SC_false and SC_false, with SC_true = true and SC_false = false.
Logical conjunction: "The and operator returns true if both operands are true, otherwise false."
SC_1 is true and SC_2, SC_3 and SC_4 are false, all Booleans.
SC_1 := SC_true and SC_true; SC_2 := SC_true and SC_false; SC_3 := SC_false and SC_true; SC_4 := SC_false and SC_false;
| SC_true | SC_false |
|---|---|
| true | false |
{
"scalars": [
{"name": "SC_true", "type": "Boolean"},
{"name": "SC_false", "type": "Boolean"}
]
}
{
"scalars": [
{"name": "SC_1", "type": "Boolean", "value": "true"},
{"name": "SC_2", "type": "Boolean", "value": "false"},
{"name": "SC_3", "type": "Boolean", "value": "false"},
{"name": "SC_4", "type": "Boolean", "value": "false"}
]
}