码迷,mamicode.com
首页 > 数据库 > 详细

Clickhouse SQL查询技巧

时间:2021-04-16 12:01:37      阅读:0      评论:0      收藏:0      [点我收藏+]

标签:use   情况   order   nio   sql查询   null   sql   click   返回   

clickhouse 在关联不上的情况会返回0值,而不是MySQL返回Null

select *  from
   (select 1 as a union all
    select 2  as a union all
    select 3  as a union all
    select 0  as a union all
    select 0  as a) x
left join (
select 2  as b, ‘adc‘ as c union all
    select 3  as b, ‘adc‘ as c union all
    select 5  as b, ‘adc‘ as c union all
    select 0  as b, ‘adc‘ as c union all
    select 0  as b, ‘adc‘ as c
           ) y on x.a = y.b
-- where c= ‘‘
order by a

Clickhouse SQL查询技巧

标签:use   情况   order   nio   sql查询   null   sql   click   返回   

原文地址:https://www.cnblogs.com/malcolmwallace/p/14664134.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!