var
temp varchar2(1000);
begin
temp:='';
temp:='create table aa(bb varchar2(100));'
execute immediate temp;
end;
temp varchar2(1000);
begin
temp:='';
temp:='create table aa(bb varchar2(100));'
execute immediate temp;
end;
2 authid current_user
3 as
4 str1 varchar2(1000);
5 str2 varchar2(1000);
6 begin
7 str1:='drop table aa';
8 execute immediate str1;
9 str1:='create table aa(bb nvarchar2(100))';
10 execute immediate str1;
11 exception
12 when others then
13 str2:=sqlerrm(sqlcode);
14 dbms_output.put_line(str2);
15 end;
16 /过程已创建。SQL> execute create_table_aa;PL/SQL 过程已成功完成。SQL> desc aa
名称 空? 类型
----------------------------------------------------- -------- ----------------
BB NVARCHAR2(100)SQL> execute create_table_aa;PL/SQL 过程已成功完成。SQL> desc aa
名称 空? 类型
----------------------------------------------------- -------- ----------------
BB NVARCHAR2(100)
估计你的表没有建成,查看一下错误提示,
在执行前设置:set serveroutput on size 1000000
PL/SQL procedure successfully completed这表示我的表没建成吗?为什么我建不了表呢,是因为我的角色权限不够还是别的原因?