title: Creating functions in sqlplus
body: <p>I am creating a function in oracle sql plus, that take empno as argument and returns its salary. But its not being created, where am I going wrong?</p>
  
  <p>Here is my function:</p>
  
  <pre><code>CREATE FUNCTION GETEMPSALARY (EMPNUMBER IN INTEGER) RETURN INTEGER
  IS
  EMPSALARY INTEGER;
  BEGIN
  SELECT SAL INTO EMPSALARY FROM EMP WHERE EMP.EMPNO = EMPNUMBER;
  RETURN EMPSALARY;
  END GETEMPSALARY;
  </code></pre>
  
  <p>Here is the error:</p>
  
  <pre><code>Error at line 1: PLS-00103: Encountered the symbol "(" when expecting one of the following:
  
     . @ % ; is authid as cluster order using external character
     deterministic parallel_enable pipelined aggregate
     result_cache
  
  
  1. CREATE FUNCTION GETNAMES1 (EMPID IN INTEGER) RETURN VARCHAR(20)
  2. IS
  3. EMPNAME VARCHAR(50);
  </code></pre>