I have two tables. One is 'business' structured like so:
business_id | name | linkto_category_id | business_category_description
and another one 'business_category' that holds the categories list
business_category_id | business_category_description
Now I would like to select all entries in 'business' with the corresponding 'linkto_category_id' that equals the 'business_category_id' in the 'business_category' table and then insert the 'business_category_description' into the 'business' table.
This is what I have so far...
INSERT INTO business(business_category_description)
(SELECT business_category.business_category_description, business_category.business_category_id, business.linkto_category_id
FROM business
INNER JOIN business_category
ON business.linkto_category_id=business_category.business_category_id);