Why can't I write DDL directly after a PLSQL anonymous block?

前端 未结 1 1872
庸人自扰
庸人自扰 2021-01-29 02:18

I have the following simple script.

declare
begin
  null;
end;

create table &&DB_SCHEMA..test_table (
   test_column varchar(20)
);

Exec

1条回答
  •  攒了一身酷
    2021-01-29 03:17

    You are simply missing a '/':

    SQL> declare
      2  begin
      3    null;
      4  end;
      5  /
    
    PL/SQL procedure successfully completed.
    
    SQL> create table create_test_table (
      2     test_column varchar(20)
      3  );
    
    Table created.
    

    Here you find something more.

    0 讨论(0)
提交回复
热议问题