Answers for "update left join"

SQL
6

update left join mysql

UPDATE  t1
LEFT JOIN
        t2
ON      t2.id = t1.id
SET     t1.col1 = newvalue
WHERE   t2.id IS NULL
Posted by: Guest on August-10-2020
5

inner join update

UPDATE 
    t1
SET 
    t1.c1 = t2.c2,
    t1.c2 = expression,
    ...   
FROM 
    t1
    [INNER | LEFT] JOIN t2 ON join_predicate
WHERE 
    where_predicate;
Posted by: Guest on September-11-2020

Code answers related to "SQL"

Browse Popular Code Answers by Language