title: How to write a procedure to square a number in oracledb
body: <pre><code>CREATE OR REPLACE PROCEDURE sqr(n IN NUMBER, res OUT NUMBER)
  IS 
  BEGIN
      res:= n*n;
      Dbms_Output.PUT_LINE(res);
      Dbms_Output.PUT_LINE('PL/SQL procedure successfully completed');
  END;
  /
  
  DECLARE
  ans NUMBER;
  BEGIN
  EXECUTE sqr(15, :ans);
  END;
  /
  </code></pre>
  <p>I'm new to SQL, trying to create a query to square a number using procedure i dont know how to do it. i was able to come with code above but for some reason i cant connect to DB!</p>
  <p>Help needed. (ignore if there are any mistakes in my que framing)</p>