有3个表:table1,table2和table3。
查询是:
select column1 from table1 where variable1=@value1 AND variable2=@value2
这里,value1和value2是存储在表table2和table3
中的整个数据答案 0 :(得分:2)
问题不是很清楚,但最接近的猜测是
SELECT column1
FROM table1
JOIN table2 ON table1.variable1 = table2.value1
JOIN table3 ON table1.variable2 = table3.value2
答案 1 :(得分:1)
试试这个
select colum1
from table1
where
variable1 in (select column2 from table2) and
variable2 in (select column3 from table3)