0

There are 3 tables: table1, table2 and table3.

The query is:

select column1 from table1 where variable1=@value1 AND variable2=@value2 

Here, value1 and value2 are the whole data stored in tables table2 and table3

1
  • this question is not very clear - it may be worth editing it to clarify what you are asking. Commented Nov 21, 2012 at 6:56

2 Answers 2

2

The question is not very clear but the closest guess would be

SELECT column1 FROM table1 JOIN table2 ON table1.variable1 = table2.value1 JOIN table3 ON table1.variable2 = table3.value2 
Sign up to request clarification or add additional context in comments.

1 Comment

value1 and value2 have multiple values form table2 and table3
1

try this

select colum1 from table1 where variable1 in (select column2 from table2) and variable2 in (select column3 from table3) 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.