sql1 = select code from table A where id=xxxxx; 得到结果 11,22 sql2 = select * from table B where code in (11,22) ; 得到1条结果 然后我写了组合查询如下: sql3 = select id from table B where code in (select code from table A where id=xxxxx) ; 为什么sql3得不到结果?是哪里的问题呢?想不通
åºè¯¥ååæ¥è¯¢éçéååæå ³ã è¯è¯æåçtableåé½æ åºæ¥ã select id from B where code in (select A.code from A where A.id=xxxxx) åºè¯¥å°±æ²¡é®é¢äºãè¿ä¸è¡çè¯ï¼å¹²è select B.id from B where B.code in (select A.code from A where A.id=xxxxx)