Pular para o conteúdo

Fóruns SQL e PL/SQL Select no exception Select no exception

#96526
Avatar photoLeonardo Litz
Participante

    Segue um exemplo:

    declare

    x dual.dummy%type;
    y dual.dummy%type;
    begin

    begin
    select dummy
    into x
    from dual
    where 1 = 2;
    exception when no_data_found then
    begin
    select dummy
    into y
    from dual;
    end
    end;
    end;