title: Create Sequence if it not exists using oracle sql developer
body: <p>i'm trying to create procedure to create Sequence if it not exists
  and return the sequence name so i can use it </p>
  
  <pre><code>create or replace
  PROCEDURE CREATESEQ 
  (
    TableName IN VARCHAR2  
  , CloumnName IN VARCHAR2  
  , pSeq_name out VARCHAR2
  ) AS 
  Seq_name varchar2(100);
  vCounter number;
  BEGIN
  
  Seq_name:=tablename||cloumnname;
  vCounter :=0;
    --  dbms_output.put_line(Seq_name);
  
  SELECT count(1)
    INTO vCounter
    FROM user_sequences
    WHERE sequence_name = Seq_name;
  
  IF vCounter &gt; 0 THEN
      pSeq_name:=seq_name;
  else
     EXECUTE IMMEDIATE  'create sequence '||Seq_name;
      pSeq_name:=seq_name;
  END IF ;
  END CREATESEQ;
  </code></pre>
  
  <p>when i try to execute CREATESEQ procedure like this</p>
  
  <pre><code>DECLARE
    TABLENAME VARCHAR2(200);
    CLOUMNNAME VARCHAR2(200);
    PSEQ_NAME VARCHAR2(200);
  BEGIN
    TABLENAME := 'Sections';
    CLOUMNNAME := 'SectionID';
  
    CREATESEQ(
      TABLENAME =&gt; TABLENAME,
      CLOUMNNAME =&gt; CLOUMNNAME,
      PSEQ_NAME =&gt; PSEQ_NAME
    );
  
    :PSEQ_NAME := PSEQ_NAME;
  END;
  </code></pre>
  
  <p>i get this error</p>
  
  <p>ORA-01031: insufficient privileges<br />
  ORA-06512: at "TRAINING_AKHADIER.CREATESEQ", line 23<br />
  ORA-06512: at line 9<br /></p>
  
  <p>appreciate any suggestion  </p>