title: Unable to execute the query in SQL Command Prompt
body: <p>I'm trying to execute the following PL/SQL query but unable to do so. The SQL Command Prompt is showing the error at the last line</p>
  
  <p>Error:</p>
  
  <pre><code>ENCOUNTERED THE SYMBOL ";" WHEN EXPECTING ONE OF THE FOLLOWING : IF.
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>SET SERVEROUTPUT ON     
  SET VERIFY OFF     
  DECLARE    
  v_reg registration%ROWTYPE;     
  v_totalscore NUMBER;    
  BEGIN  
  v_reg.registrationid :='&amp;registrationid';    
  v_reg.studentid := &amp;studentid;    
  v_reg.courseid := '&amp;courseid';    
  v_reg.projectscore := &amp;projectscore;    
  v_reg.assignmentscore := &amp;assgnscore;    
  v_reg.internalscore := &amp;internalscore;    
  v_reg.semesterscore := &amp;semesterscore;    
  
  IF NOT v_reg.projectscore BETWEEN 0 AND 20 THEN    
  DBMS_OUTPUT.PUT_LINE('Invalid project score');    
  ELSIF NOT v_reg.assignmentscore BETWEEN 0 AND 10 THEN    
  DBMS_OUTPUT.PUT_LINE('Invalid assignment score');    
  ELSIF NOT v_reg.internalscore BETWEEN 0 AND 20 THEN    
  DBMS_OUTPUT.PUT_LINE('Invalid internal score');    
  ELSIF NOT v_reg.semesterscore BETWEEN 0 AND 50 THEN    
  DBMS_OUTPUT.PUT_LINE('Invalid semester score');    
  
  ELSE    
  v_totalscore:=v_reg.projectscore+v_reg.assignmentscore+v_reg.internalscore+v_reg.semesterscore;    
  DBMS_OUTPUT.PUT_LINE('Student id'||v_reg.studentid);    
  DBMS_OUTPUT.PUT_LINE('Course id : '||v_reg.courseid);    
  DBMS_OUTPUT.PUT_LINE('Total score : '||v_totalscore);    
  END IF;    
  END;    
  </code></pre>
  
  <p>Following is the table structure of the registration table referred for the code above.</p>
  
  <pre><code>CREATE TABLE registration (    
  registrationid NUMBER CONSTRAINT pk_registration_registrationid PRIMARY KEY,    
  studentid NUMBER CONSTRAINT fk_registration_studentid REFERENCES student(studentid),    
  courseid VARCHAR2(4) CONSTRAINT fk_registraiton_courseid REFERENCES course(courseid),    
  projectscore NUMBER(3),    
  assignmentscore NUMBER(3),    
  internalscore NUMBER(3),    
  semesterscore NUMBER(3),    
  grade Varchar2(2)    
  );    
  </code></pre>
  
  <p>I'm new to SQL and Run Sql using Command Prompt, I didn't type the code for creating the table, is that the probable cause ?</p>