title: Mysql pass empty value to a procedure
body: <p>I created a procedure with a date input parameter. I would like to know if is it possible to set a condition which check if input value is empty. I show you my code:</p>
  
  <pre><code>CREATE PROCEDURE xxx.yyy(IN l_day DATE)
  </code></pre>
  
  <p>.....</p>
  
  <pre><code> DECLARE l_today DATE;
  </code></pre>
  
  <p>......</p>
  
  <pre><code>IF l_day=NULL THEN  SET l_today=CURDATE();
    ELSE SET l_today=l_day;
    END IF;
  </code></pre>
  
  <p>I would like to be able to call this procedure both with an input like:</p>
  
  <pre><code>call xxx.yyy('2015-07-01')
  </code></pre>
  
  <p>or with</p>
  
  <pre><code>call xxx.yyy()
  </code></pre>
  
  <p>Do you think that this is possible? Thanks</p>