title: Create table in Procedure
body: <p>I have created the table "Risiko" which shouldntbe dynamic, i tought it would be that simple but it was not. How should i solve it? and what am i doing wrong?</p>
  
  <pre><code>CREATE OR REPLACE PROCEDURE TABLERISIKO IS
  
  
      BEGIN
         drop table risiko;
         CREATE TABLE Risiko
            (
            RNr       INTEGER,
            Projekt       INTEGER,
            Text       VARCHAR(25),
            Gruppe       INTEGER,
            Auswirkung    INTEGER,
            WKeit       INTEGER,
            Pruefdatum    DATE,
            PRIMARY KEY    (RNr),
            CONSTRAINT FKRisiko1 FOREIGN KEY (Projekt)
            REFERENCES Projekt(ProNr),
            CONSTRAINT FKRisiko2 FOREIGN KEY (Gruppe)
            REFERENCES Risikogruppe (RGNr),
            CONSTRAINT PosAuswirkung CHECK(Auswirkung &gt;=0),
            CONSTRAINT WKeitProzent CHECK(WKeit&gt;=0 AND WKeit&lt;=100)
            );
  
         INSERT INTO Risiko 
         VALUES(1,1,'Anforderungenunklar',1,50000,30
         ,TO_DATE('25.01.06','DD.MM.YY'));
         INSERT INTO Risiko 
         VALUES(2,1,'Abnahmeprozess offen',2,30000,70
         ,TO_DATE('26.02.06','DD.MM.YY'));
         INSERT INTO Risiko
         VALUES(3,2,'Ansprechpartner wechseln',1,20000,80
         ,TO_DATE('06.05.06','DD.MM.YY'));
         INSERT INTO Risiko
         VALUES(4,2,'neue Entwicklungsumgebung',3,40000,20
         ,TO_DATE('05.10.06','DD.MM.YY'));
  
      END;
  </code></pre>
  
  <p>Thanks for help</p>