title: How to SELECT multiple values in MYSQL trigger?
body: <p>how can I SELECT multiple values INTO variables in MYSQL trigger?
  I have tried SELECT values into variables in this way but it didn't work. I was inspired by this thread <a href="https://dba.stackexchange.com/questions/103080/how-to-use-trigger-to-set-value-based-on-query-result">how to use trigger to set value based on query result</a>.
  When I examined value in variables, it is NULL. When I put this SELECT into mysql workbench it will select right values. I check column types and they are same type as variables in trigger.
  With debug I discovered that there is problem with SELECTing values.
  Thank you in advance.</p>
  <p>Here is my trigger:</p>
  <pre><code>CREATE TRIGGER fin_den_zam_insert
  AFTER INSERT
       ON table1 FOR EACH ROW
  
  BEGIN
  
  DECLARE koef1 DECIMAL(6,3);
  DECLARE koef2 DECIMAL(6,3);
  DECLARE koef3 DECIMAL(6,3);
  DECLARE sum DECIMAL(6,3);
  
  SELECT DISTINCT
      koef_salary, koef_sunday, koef_holiday
  INTO 
      koef1 , koef2, koef3 
  FROM 
      employee E
  WHERE 
      E.personal_number = NEW.personal_number_id;
  
  
  SET sum := NEW.salary * (koef1 + koef2 + koef3);
  
  
  INSERT INTO export_table
              (
                  id_export,
                  personal_number, 
                  final_sum
                   ) 
  VALUES 
              (
                  NULL,
                  NEW.personal_number_id, 
                  sum
                  ); 
  
  END; 
  
  //
  
  DELIMITER ;
  </code></pre>