HIVE 0.13 之后,有子查询 IN 写法 SELECT*FROM A.A_TABLE A WHERE R_SE ='C'AND A.O_CODEIN(SELECT O_CODE FROM B.B_TABLE BAND CODE ='M111') 特别需要注意的是 IN 前面字段的表名不能省略,不然会报错半连接 EXISTS 写法 EXPLAIN SELECT*FROM A.A_TABLE A WHERE R_SE ='C'ANDEXISTS(SELECT1FROM B.B_TABLE BWHERE A.O_CODE = B.O_CODEAND CODE ='M111')