在Oracle中,NO_DATA_FOUND是一个常见的异常,它发生在执行SELECT INTO语句时未找到任何数据的情况下。为了处理这种情况,我们可以使用PL/SQL的BEGIN ... EXCEPTION ... END块来捕获这个异常,并在捕获到异常后执行多个判断条件,最终决定程序的行为,包括终止程序并返回结果。 1. 理解no_data_found异常 NO_DATA_FOUND...
exceptionwhenNO_DATA_FOUNDthenraise_application_error('-20000','没找到数据');--异常外抛给调用者,直接报错end; 如下图: 也可以在异常中返回一个有意义的提示,告诉调用者一个有意义的信息,如: createorreplacefunctionfn_test(c_xmvarchar)returnvarchar2asV_P1varchar(10);beginselectnameintoV_p1fromt1wher...
exceptionwhenNO_DATA_FOUNDthenraise_application_error('-20000','没找到数据');--异常外抛给调用者,直接报错end; 如下图: 也可以在异常中返回一个有意义的提示,告诉调用者一个有意义的信息,如: createorreplacefunctionfn_test(c_xmvarchar)returnvarchar2asV_P1varchar(10);beginselectnameintoV_p1fromt1wher...
1) 查看应用错误信息 SQL> select apply_name,LOCAL_TRANSACTION_ID,SOURCE_TRANSACTION_ID,ERROR_MESSAGE from dba_apply_error; APPLY_NAME LOCAL_TRANSACTION_ID SOURCE_TRANSACTION_ID ERROR_MESSAGE APPLY$_WENDING_80 2.30.117296 9.16.117153 ORA-01403: no data found 2) 显示事务的错误信息 SQL> SET SER...
No_data_found SELECT INTO没有找到数据 ORA-1422 Too_many_rows SELECT INTO 返回多行 ORA-1476 Zero-divide 试图被零除 ORA-1722 Invalid-NUMBER 转换一个数字失败 ORA-6500 Storage-error 内存不够引发的内部错误 ORA-6501 Program-error 内部错误
No_data_found:没有找到数据 Too_many_rows:select …into语句匹配多个行 Zero_Divide:被零除 Value_error:算数或转换错误 Timeout_on_resource:在等待资源时发生超时 示例:被0除 declare pnum number; begin pnum := 1/0; exception when zero_divide then dbms_output.put_line('1: 0不能做分母'); dbm...
ORA-01403: NO DATA FOUND Cause: Possible data-related issue in the source repository. Action: Contact Oracle Support. ORA-06502: PL/SQL NUMERIC OR VALUE ERROR WHEN INSERTING INTO table_name Cause: Possible data-related issue in the source repository. Action: Contact Oracle Support. ORA-2029...
- Could not submit job to kill concurrent process xxxx: Oracle error 100: ORA-01403: no data found has been detected in FND_CONC_RAC_UTILS.SUBMIT_MANAGER_KILL_SESSION. Found dead process: spid=(aaa), cpid=(xxxx), ORA pid=(zz), manager=(0/x) ...
ORA-1403 No_data_found SELECT INTO没有找到数据 ORA-1422 Too_many_rows SELECT INTO返回多行 ORA-1476 Zero-divide 试图被零除 ORA-1722 Invalid-NUMBER 转换一个数字失败 ORA-6500 Storage-error 内存不够引发的内部错误 ORA-6501 Program-error 内部错误 ...
command.This error generally manifests itself when there is inconsistency in the data/Index block. Some of the block check errors that may be found:-a.) Row locked by a non-existent transactionb.) The amount of space used is not equal to block sizec.) Transaction header lock count mismat...