SOLVED: update query update from another table

Post Reply
mister_v
Posts: 188
Joined: Thu Mar 04, 2010 9:19 pm

SOLVED: update query update from another table

Post by mister_v »

Hi,

Can I run an query,
That update a table with a select from another table?
Last edited by mister_v on Thu Nov 01, 2018 12:23 pm, edited 1 time in total.
chris
Site Admin
Posts: 194
Joined: Mon Jul 21, 2008 9:52 am

Re: update query update from another table

Post by chris »

Yes, you can with update:

here is an example:

Code: Select all

UPDATE update_table AS a, source_table AS b SET a.update_column=b.source_table WHERE a.id=b.id;
mister_v
Posts: 188
Joined: Thu Mar 04, 2010 9:19 pm

Re: update query update from another table

Post by mister_v »

thanks.
Post Reply