Вы можете использовать
raise_application_error(-20001,'None of the tables contain this account !');
или
dbms_output.put_line('None of the tables contain this account !');
в последнем возбужденном операторе исключения дляAccount
таблицы:
DECLARE
cur_balance Account.Balance%type;
cl_id Account.Cid%type;
id trnsaction.Tid%type;
BEGIN
begin
select Balance, Cid
into cur_balance, cl_id
from Account
where Accno = x;
ac_branch := 'mirpur';
exception
when no_data_found then
select Balance, Cid
into cur_balance, cl_id
from Account1
where accno = x;
ac_branch := 'gulshan';
exception
when no_data_found then
raise_application_error(-20001,'None of the tables contain this account !');
end;
begin
select max(Tid)
into id
from (select Tid
from trnsaction
union
select Tid from trnsaction1);
id := id + 1;
exception
when no_data_found then null;
end;
END;
, где типы столбцов Account
против Account1
и trnsaction1
против trnsaction
таблиц считаются идентичными относительно.
Если вы предпочитаете использовать dbms_output.put_line
, перед этим введите команду set serveroutput on
.
Кстати, нет необходимости повторять другой запрос, который не зависит от наших заинтересованных запросов.