title: PLSQL Printing prime numbers
body: <p>I want to print prime numbers between <code>1 to 50</code>. But I don't understand what I am doing wrong in my code. After <code>BEGIN</code>, SQLDeveloper says I had an error because it expected another sign and not <code>=</code> . </p>
  
  <pre><code>SET SERVEROUTPUT ON
  DECLARE
      i NUMBER;
      counter NUMBER;
      n NUMBER;
      k NUMBER;
  BEGIN
      i := 2;
      counter := 0;
      n := 50;
      k := n/2;
      FOR i IN 1..k LOOP
          IF (n%i := 0 ) THEN
              counter := 1;
          END IF;
          IF (counter := 0) THEN
              DBMS_OUTPUT.PUT_LINE(n||' is prime number');
          END IF;
      END LOOP;
  END;
  </code></pre>