bool 类型在内部以 UInt8 形式存储。可能的值为 true (1) 和 false (0) 。
SELECT true AS col, toTypeName(col);
┌CREATE TABLE test_bool
(
`A` Int64,
`B` Bool
)
ENGINE = Memory;
INSERT INTO test_bool VALUES (1, true),(2,0);
SELECT * FROM test_bool;
┌bool 类型在内部以 UInt8 形式存储。可能的值为 true (1) 和 false (0) 。
SELECT true AS col, toTypeName(col);
┌CREATE TABLE test_bool
(
`A` Int64,
`B` Bool
)
ENGINE = Memory;
INSERT INTO test_bool VALUES (1, true),(2,0);
SELECT * FROM test_bool;
┌