title: MySQL create stored procedure syntax with delimiter
body: <p>I am trying to create a stored procedure in MySQL using a delimiter like this:</p>
  
  <pre><code>use am;
  
  DELIMITER $$
  
  CREATE PROCEDURE addfields()
  BEGIN
    DECLARE done INT DEFAULT FALSE;
    DECLARE acc INT(16);
    DECLARE validId INT DEFAULT 0;
  
  END $$
  
  DELIMITER ;
  </code></pre>
  
  <p>It gives me an error:</p>
  
  <pre><code>#1304 - PROCEDURE addfields already exists
  </code></pre>
  
  <p>What is the proper syntax for making a stored procedure with a delimiter and dropping it if it exists first?</p>