Jump to content

Select using value from another table


beennn
 Share

Recommended Posts

Thank you. Mm. I'm a bit lost, what you've posted is what I was after, but I'm still a bit stuck with something else I'm trying do. I have table1 which contains foreign keys to 3 other tables, table2 table3 and table4; Can I select specific columns inside of table2 table3 and table4, matching the ID in each of these tables to those in table1, and output the result in one go? So like: SELECT column2 FROM table2 WHERE column1 = table1.column1 = 1;SELECT column2 FROM table3 WHERE column1 = table1.column2 = 3;SELECT column2 FROM table4 WHERE column1 = table1.column4 = 6; in one query?

Edited by beennn
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...