title: Computation in MySQL
body: <p>I want to get the results of a calculation in a stored procedure which admits only one parameter ("code") in example.</p>
  
  <pre><code>delimiter $$
  create procedure Test(in code varchar(8)) language sql deterministic
  begin
  set @sql=concat("select (a+b+c) as N, (d+e+f) as D from Tbl where code='",code,"'");
  set r=N/D;
  prepare stmt from @sql;
  execute stmt;
  deallocate prepare stmt;
  set @age=@NUM/@DEN;
  end$$
  </code></pre>
  
  <p>I would like to get N, D and r.</p>