问题描述
如果我在调试时有一个包含三个select语句的过程,您将如何准确找到哪个语句中出现错误?
专家解答
简单的... 错误会告诉你它到底在哪里出错了
SQL> create or replace procedure p is 2 x int; 3 begin 4 -- this one will work 5 select 1 into x from dual; 6 7 -- this one will work 8 select 1 into x from dual; 9 10 -- this one will FAIL 11 select 1 into x from dual where 1=0; <======LINE 11 12 13 -- this one will work 14 select 1 into x from dual; 15 16 -- this one will work 17 select 1 into x from dual; 18 19 end; 20 / Procedure created. SQL> SQL> SQL> exec p BEGIN p; END; * ERROR at line 1: ORA-01403: no data found ORA-06512: at "MCDONAC.P", line 11 <======LINE 11 ORA-06512: at line 1
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。




