You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mysql> select true or true, false or true, false or null, true or null, null or null;
+----------------+-----------------+-----------------+----------------+----------------+
| (true or true) | (false or true) | (false or NULL) | (true or NULL) | (NULL or NULL) |
+----------------+-----------------+-----------------+----------------+----------------+
| 1 | 1 | 0 | 1 | 0 |
+----------------+-----------------+-----------------+----------------+----------------+
1 row in set (0.03 sec)
Read 1 rows, 1 B in 0.006 sec., 167.83 rows/sec., 167.83 B/sec.
mysql> select true and true, false and true, false and null, true and null, null and null;
+-----------------+------------------+------------------+-----------------+-----------------+
| (true and true) | (false and true) | (false and NULL) | (true and NULL) | (NULL and NULL) |
+-----------------+------------------+------------------+-----------------+-----------------+
| 1 | 0 | NULL | NULL | NULL |
+-----------------+------------------+------------------+-----------------+-----------------+
1 row in set (0.03 sec)
Read 1 rows, 1 B in 0.005 sec., 186.57 rows/sec., 186.57 B/sec.
In MySQL:
mysql> select true or true, false or true, false or null, true or null, null or null;
+--------------+---------------+---------------+--------------+--------------+
| true or true | false or true | false or null | true or null | null or null |
+--------------+---------------+---------------+--------------+--------------+
| 1 | 1 | NULL | 1 | NULL |
+--------------+---------------+---------------+--------------+--------------+
1 row in set (0.04 sec)
mysql> select true and true, false and true, false and null, true and null, null and null;
+---------------+----------------+----------------+---------------+---------------+
| true and true | false and true | false and null | true and null | null and null |
+---------------+----------------+----------------+---------------+---------------+
| 1 | 0 | 0 | NULL | NULL |
+---------------+----------------+----------------+---------------+---------------+
1 row in set (0.04 sec)
In Clickhouse:
0cf42bb123f1 :) select true or true, false or true, false or null, true or null, null or null;
SELECT
1 OR 1,
0 OR 1,
0 OR NULL,
1 OR NULL,
NULL OR NULL
Query id: e45d505f-e341-4637-8426-8ac89e208d8d
┌─or(1, 1)─┬─or(0, 1)─┬─or(0, NULL)─┬─or(1, NULL)─┬─or(NULL, NULL)─┐
│ 1 │ 1 │ ᴺᵁᴸᴸ │ 1 │ ᴺᵁᴸᴸ │
└──────────┴──────────┴─────────────┴─────────────┴────────────────┘
1 rows in set. Elapsed: 0.004 sec.
0cf42bb123f1 :) select true and true, false and true, false and null, true and null, null and null;
SELECT
1 AND 1,
0 AND 1,
0 AND NULL,
1 AND NULL,
NULL AND NULL
Query id: d3a3aea9-e2ca-47c1-af2e-285ed8ba260a
┌─and(1, 1)─┬─and(0, 1)─┬─and(0, NULL)─┬─and(1, NULL)─┬─and(NULL, NULL)─┐
│ 1 │ 0 │ 0 │ ᴺᵁᴸᴸ │ ᴺᵁᴸᴸ │
└───────────┴───────────┴──────────────┴──────────────┴─────────────────┘
1 rows in set. Elapsed: 0.002 sec.
The text was updated successfully, but these errors were encountered:
In
databend
:In
MySQL
:In
Clickhouse
:The text was updated successfully, but these errors were encountered: