title: MySQL Error Code 1241
body: <p>I just tried to use the <code>IF-ELSE with SELECT</code> of mySQL. I know there's a syntax error here but can't find it. It's returning <code>Error Code 1241. Operand should contain 1 column(s)</code> on mySQL Workbench.</p>
  
  <p>I don't see any error or maybe I just can't find it. What could be causing this?</p>
  
  <pre><code>CREATE DEFINER=`root`@`localhost` PROCEDURE `addCurriculum`(    
      IN p_curcName varchar(100), 
      IN p_description TEXT, 
      IN p_yearLevel VARCHAR(50),
      IN p_syStart INT, 
      IN p_syEnd INT, 
      IN p_creator VARCHAR(50)            )
  BEGIN
      IF 
          (SELECT name,description,yearLevel,syStart,syEnd
          FROM curriculum 
          WHERE 
              name        =       p_curcName 
          AND description =       p_description
          AND yearLevel   =       p_yearLevel 
          AND syStart     =       p_syStart 
          AND syEnd       =       p_syEnd 
          AND creator     =       p_creator )
  
      THEN --
  
      BEGIN
          SELECT 'Curriculum you are trying to add already exists';
      END;
  
          ELSE
  
              BEGIN
                  INSERT INTO curriculum(name, description, yearLevel, syStart, syEnd, creator)
                  VALUES(p_curcName,p_description,p_yearLevel,p_syStart,p_syEnd,p_creator);
              END;
  
      END IF;
  
  END
  </code></pre>
  
  <p>I'd appreciate any help since I'm new to the language. I just started learning Transaction and Procedures.</p>
  
  <p>Thanks. </p>