I have the following SQL:
SELECT * FROM `table` WHERE `code` = 15510642
I want to modify so that it checks another table as well, so for example:
SELECT * FROM `table`,`table2` WHERE `code` = 15510642
However that doesn’t work. Please help!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Perhaps the poster means
UNIONbecause he wants results from both tables?Works only when both tables contains same column (or specify them instead
*)