I want to get data from two tables in my database. Here’s what my tables might look like:
- table 1 with fields id, author, profession, country
- table 2 with fields id, quote, author, category
I want to select quote and author from table 2 and the corresponding profession from table 1, with the same author in both tables.
How do I construct a query that does this?
Supposing that your
authorcolumn contains unique identifiers for authors, try: