我希望整个查询针对where子句中的子查询返回的每个值运行。我无法弄清楚我在这里做错了什么。请帮忙?
SELECT a.*, b.*, c.*
FROM table1 a, table2 b, table3 c
WHERE a.val1 = ( select val1 from table1 )
AND a.val2 = b.val3
AND a.val4 = c.val5;
答案 0 :(得分:0)
in
代替=
SELECT a.*, b.*, c.*
FROM table1 a, table2 b, table3 c
WHERE a.val1 in ( select val1 from table1 )
AND a.val2 = b.val3
AND a.val4 = c.val5;