As you can see from the image I have a table called wpw8_postmeta
where it has four columns and I have searched for the term release and got the following results.
I want to copy the results (release_date [meta_value]) to another table called wpw8_test
using the post_id
as foreign key/primary key.
The second table looks like this
After the update will be done it should look like this
Advertisement
Answer
You seem to be looking for the update ... join
syntax:
update wpw8_test t inner join wpw8_postmeta p on p.post_id = t.post_id set t.release_date = p.meta_value where p.meta_key like '%release%'