读书人

帮忙看一下SQL,解决马上结贴,该如何解

发布时间: 2012-03-02 14:40:28 作者: rapoo

帮忙看一下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 ''%广东%'')))

[解决办法]

SQL code
什么意思? 是要这样么?表: 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  '%广东%')) 

读书人网 >.NET

热点推荐