title: Create a MySQL procedure variable which is initialized when not provided
body: <p>I need to create a MYSQL procedure where the procedure accepts several parameters and works with them. However, in the case where it is not present, the parameter variables pick some 'default' values and continue. Similar to how the pseudo-function-overload is handled in PHP.</p>
  
  <p>This code is what I could come up with.</p>
  
  <pre><code>CREATE PROCEDURE PROC_INS_CONTENT_TEST(IN DATA_VAL LONGTEXT)
  BEGIN
      IF (DATA_VAL IS NULL) THEN SET DATA_VAL='DEFAULT'; END IF;
      INSERT INTO CONTENT_TEST (DATA) VALUES (DATA_VAL);
  END
  </code></pre>
  
  <p>And this code does not work the way I want it to behave. Is there a way to assign the default value to the variable right when the parameter is declared?</p>