帮忙看一下SQL,解决马上结贴
表: A,B,C三表查询
对:
select * from A where (A.ID in (select ID from B))
错
select * from A where (A.ID in (select ID from B where (B.ids=C.ids)))
错:
select * from A where (A.ID in (select ID from B where (B.ids=C.ids) and (C.Name like ''%广东%'')))
[解决办法]
什么意思? 是要这样么?表: A,B,C三表查询对:select * from A where (A.ID in (select ID from B))错select * from A where (A.ID in (select ID from B inner join c on B.ids=C.ids))错:select * from A where (A.ID in (select ID from B inner join c on B.ids=C.ids and C.Name like '%广东%'))