0
我在clickhouse表中有String列。 我尝试改变与修改型表UInt32的:如何在clickhouse中使用toUInt32OrZero函数改变列的类型?
ALTER TABLE main.abonents MODIFY COLUMN device_type UInt32 DEFAULT 0
,但有错误:
Received exception from server: Code: 6. DB::Exception: Received from 5.200.55.122:9000. DB::Exception: Cannot parse string 'mo' as UInt32: syntax error at begin of string. Note: there are toUInt32OrZero function, which returns zero instead of throwing exception..
很显然,clickhouse像“移动”和抛出异常字符串中使用toUint32
功能。其建议使用功能toUInt32OrZero
来转换类型。
如何使用toUInt32OrZero
功能与ALTER TABLE?