HomePostsGithub

MySQL: Snippets

SQL UPDATE SET with INNER JOIN

UPDATE 
    table_a AS tbl_a
INNER JOIN
		table_b AS tbl_b
ON
		tbl_a.ref_id = tbl_b.id
SET 
		tbl_a.data = tbl_b.data;
<-- Back to Posts