半连接

半连接
逐暗者MaxCompute支持半连接操作,通过右表过滤左表的数据,使右表的数据不出现在结果集中,可以提高查询性能。
left semi join
当join条件成立时,返回左表中的数据。如果左表中满足指定条件的某行数据在右表中出现过,则此行保留在结果集中。
left anti join
当join条件不成立时,返回左表中的数据。如果左表中满足指定条件的某行数据没有在右表中出现过,则此行保留在结果集中。
示例数据
1 | select * from sale_detail a left semi join sale_detail_sj b on a.total_price=b.total_price; |
1 | select * from sale_detail a left anti join sale_detail_sj b on a.total_price=b.total_price; |
评论
匿名评论隐私政策
✅ 你无需删除空行,直接评论以获取最佳展示效果