以下是测试文件:
create user just_a_test identified by 123456 profile "DEFAULT" 
default tablespace "USERS" temporary tablespace "TEMP";
grant dba,connect,resource to just_a_test;
declare
v1 varchar2(40);
begin
v1:='用户 just_a_test 生成';
dbms_output.put_line(v1);
-----------------------------
exception --异常模块
when others then --异常类型
dbms_output.put_line(SQLERRM); --异常信息显示
end;
drop user just_a_test;请问:为什么我把文件导入sqlplus后,在declare以下的部分无法执行呢?
还有就是把这个文件导入之后执行时显示行号,表示还能输入
求解释

解决方案 »

  1.   

    declare
    v1 varchar2(40);
    begin
    v1:='用户 just_a_test 生成';
    dbms_output.put_line(v1);
    -----------------------------
    exception --异常模块
    when others then --异常类型
    dbms_output.put_line(SQLERRM); --异常信息显示
    end;
    /注意那个斜杠了吗?加上去  表示提交的意思。在脚本中的程序块必须用这个。
      

  2.   

    sqlplus中提示ERROR位于第2行,指明错误是无效字符,*号指在了;分号下面,
    可是我单独执行这个语句并没有提示错误啊
      

  3.   

    偶滴神啊,这玩意怎么这么破啊,快来个人解救一下我吧。
    http://localhost:80/isqlplus 提示无法登录web界面,HTTP404错误,为什么oracle把界面做的这么糟糕啊,无语啊