企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
`left semi join`同`in`是一样的效果。 ```sql select * from left_tbl lt left semi join right_tbl rt on lt.id=rt.id; +--------+----------+---------+--+ | lt.id | lt.name | lt.age | +--------+----------+---------+--+ | 1 | 张三 | 20 | | 2 | 李四 | 22 | +--------+----------+---------+--+ select * from left_tbl lt where lt.id in(select id from right_tbl); +--------+----------+---------+--+ | lt.id | lt.name | lt.age | +--------+----------+---------+--+ | 1 | 张三 | 20 | | 2 | 李四 | 22 | +--------+----------+---------+--+ ```