I have two tables: table 1 = university and table 2 = school
I added university_id
into the table 2 and I need to connect the two tables.
If university_name
from table 1 and name
from table 2 are identical, get the id
from table 1 and replace it onto table 2 university_id
I am very new to sql so if you could explain that would be great. I have also tried the following with no avail!
select a.id,b.name from university as a
inner join school as b on a.university_name = b.name
UPDATE `school` SET `university_id` = a.id WHERE a.university_name = b.name