每天一点点,记录工作中实操可行
今天在写bug时,遇到一个小小的问题
字段是boolean布尔类型,字段返回值为true,false
于是,我写下了这句
case when column_name = 'true' then 1 else 0 end
结果却和想象中不一样
嗯,所以呢??
case when column_name = true then 1 else 0 end
这样才对啊
记录一下,下次,呃,没有下次了
每天一点点,记录工作中实操可行
今天在写bug时,遇到一个小小的问题
字段是boolean布尔类型,字段返回值为true,false
于是,我写下了这句
case when column_name = 'true' then 1 else 0 end
结果却和想象中不一样
嗯,所以呢??
case when column_name = true then 1 else 0 end
这样才对啊
记录一下,下次,呃,没有下次了