MySQL - Replace NULL or empty with 0000
<p>I try to replace null value with string 0000</p>

<pre><code>SELECT customer_id
FROM customer c 
LEFT JOIN user u ON u.idc = c.id
WHERE deleted = 0
</code></pre>

<p>I try with </p>

<p><code>IFNULL(c.customer_id,'0000')</code> </p>

<p><code>COALESCE(c.customer_id,'0000')</code></p>

<p><code>REPLACE(c.customer_id,'','0000')</code> </p>

<p>but don't work.</p>

<p>Result should be:</p>

<pre><code>(Before)    (After)
null        0000
1234        1234
            0000
</code></pre>

<p>What should I do ?</p>