Parsing PL/SQL code to check against syntax and semantic errors

后端 未结 4 816
鱼传尺愫
鱼传尺愫 2021-01-14 04:40

Please consider following scenario:

  • I have a Text-Area and a Button on UI.
  • User will enter a PL/SQL block in
4条回答
  •  礼貌的吻别
    2021-01-14 05:06

    SQL> explain plan for select from dual;
    explain plan for select from dual
                            *
    ERROR at line 1:
    ORA-00936: missing expression
    
    
    SQL> explain plan for select * from dual;
    
    Explained.
    

    or

    declare
      c integer := dbms_sql.open_cursor();
    begin
     dbms_sql.parse(c, 'select * emp', dbms_sql.native);
     dbms_sql.close_cursor(c);
    end;
    /
    Error at line 1
    ORA-00923: FROM keyword not found where expected
    ORA-06512: at "SYS.DBMS_SQL", line 1053
    ORA-06512: at line 4
    

    or hit http://www.softpedia.com/get/Internet/Servers/Database-Utils/EasySQL-Checker-for-Oracle.shtml

提交回复
热议问题