Click here to Skip to main content
15,880,427 members
Please Sign up or sign in to vote.
2.50/5 (2 votes)
See more:
SQL
SELECT answer FROM answer WHERE q_id=(SELECT q_id FROM question WHERE dept="Maths")
Posted
Updated 28-Sep-12 7:41am
v2
Comments
Richard C Bishop 28-Sep-12 13:42pm    
And your question is....?

1 solution

Try by changing it to as below.
SQL
SELECT answer FROM answer WHERE q_id in (SELECT q_id FROM question WHERE dept="Maths")
 
Share this answer
 
Comments
YoGiV 28-Sep-12 13:46pm    
Thank this query is working.
RaisKazi 28-Sep-12 13:48pm    
Glad to know that, :) Cheers - Rais
YoGiV 28-Sep-12 14:00pm    
Can you help me in php code.
RaisKazi 28-Sep-12 14:02pm    
Haven't worked on PHP, but you may post it as a new question, so that it may be answered by someone. Cheers
Maciej Los 28-Sep-12 15:42pm    
Good work, my 5!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900