SQL Select to Update
<p>I'm trying to convert this <code>SELECT</code> statement to an <code>UPDATE</code> statement but it's too hard. I don't even know if I can keep <code>INNER JOIN</code>s while updating, so I think I need some help from an SQL genius. </p>

<p>I need to update my customer ID on liste_objectif where it's NULL, and I have this id on customers table (by the mail)</p>

<pre><code>SELECT DISTINCT * 
FROM liste_objectifs l
INNER JOIN customers c ON ( l.email = c.customer_email ) 
WHERE c.customer_id
IN (
    SELECT customer
    FROM newsletters_inscriptions
    WHERE liste
    IN ( 786, 878, 874, 875, 876, 877 )
)
AND c.customer_id NOT 
IN (
    SELECT customer
    FROM newsletters_blacklists
    WHERE newsletter =1
)
ORDER BY  `l`.`email` ASC 
LIMIT 0 , 30
</code></pre>

<p>Thanks !</p>