title: MySQL: use "IF NOT IN" in procedure
body: <p>I'm trying to check <code>class</code> using MySQL procedure, but the following procedure always returns 0:</p>
  
  <pre><code>DELIMITER //
  CREATE PROCEDURE `validate_class`(IN `class` INT)
  BEGIN
      if(class NOT IN  ('A','B','E') ) then    
           select 1;
      else
           select 0;
      end if;
  END //
  DELIMITER ;
  </code></pre>
  
  <p>call test:</p>
  
  <pre><code>call validate_class('G'); //return 0
  call validate_class('A'); //return 0
  </code></pre>
  
  <p>It should return <code>1</code> when class isn't (<code>A</code> and <code>B</code> and <code>E</code>), any help?</p>