请问大侠们:这个多表查询如何查询
表a: ID a1, a2, a3, a4, a5表b: id aid, b1, b2, b3, b4
表c: id aid, c1, c2, c3, c4
表d: id aid, d1, d2, d3, d4
表e: id aid, e1, e2, e3, e4
表f: id aid, f1, f2, f3, f4
一共五个表,表a代表信息,b到f表代表内容,他们aid与a表中的id对应,所有内容均为数字,现在我想查出 b1<16 and c1=20 and d3>80 and e4<25 and f1=1.8 符合这些条件的a,应该怎样写SQL语句.下面这么写对吗,为什么什么也查不出呀
SELECT a.* FROM ((((b INNER JOIN c ON b.aid = c.aid) INNER JOIN d ON b.aid=d.aid) INNER JOIN e ON b.aid = e.aid) INNER JOIN f ON b.aid = f.aid) INNER JOIN a ON b.aid = a.id WHERE (((b.b1)<16) AND ((c.c1)=20) AND ((d.d3)>80) AND ((e.e4)=,25 AND ((f.f1)=1.8)); --------------------编程问答-------------------- select a.* from a,b,c,d,e,f where a.id=b.id and b.id=c.id and c.id=d.id and d.id=e.id and e.id=f.id and b.b1<16 and c.c1=20 and d.d3>80 and e.e4 <25 and f.f1=1.8
你看看这样是否可以。 --------------------编程问答--------------------
补充:企业软件 , WebSphere