Suppose I have two tables in SQL where
table1 has columns – id, name, sex.
table2 has columns – eid, group, hours.
column ‘eid’ is the foreign key in table2 and column ‘id’ is the primary key on table1.
suppose I conduct a search using ‘select * from table2 where hour=x’ in table 2 and get some results. How can I list the names of the people (from table1) associated with the ids from the search?
GOt it!
1 Answer