Arkham Angel Arkham Angel - 9 months ago 36
SQL Question

sqlite3 query return field from table1 based on information from table2

Product: Sqlite 3

I am very, very new to SQL. At this time, I do not know how to ask the question properly.

I have two tables, tableA and tableB.

TableA has the following relevant columns:

| itemID | itemName |

TableB has the following relevant columns:

| typeID |

I want to do a query that will return
for each

Based on my very limited knowledge and searching, I've started looking into SQL JOIN type statements, but I'm having difficulty figuring it out.

Any advice or direction is appreciated.


If you have common values in itemID and typeID then probably You can join on them like

select t1.itemName 
from table1 t1 join table2 t2 on t1.itemID = t2.typeID;