title: Mysql Stored Procedure Select Column into OUT parameter
body: <p>I have a stored procedure similar to this one, and when I try to save it, I get this error: </p>
  
  <blockquote>
    <p>Undeclared variable: my_column</p>
  </blockquote>
  
  <pre><code>CREATE PROCEDURE p (OUT column_param VARCHAR(25))
  BEGIN
      SELECT my_column INTO coumn_param limit 1;
  END;
  </code></pre>
  
  <p>Why can I not select a column to return?</p>
  
  <p><strong>Here my actual query within the procedure:</strong></p>
  
  <pre><code>select latitude into lat, longitude into lon
  from cities cc
  inner join countries c on cc.country_id = c.country_id
  inner join regions r on cc.region_id = r.region_id and c.country_id = r.country_id
  left join locations l on cc.city_id = l.city_id
  where 
  city = coalesce(cty, city) and
  country = coalesce(ctry, country) and
  region = coalesce(reg, region)
  limit 1;
  </code></pre>