1
I am running this PL/SQL and in case the condition falls on else
, how to display the message to the user?
declare
cont integer;
tabela varchar2(100) := 'PESSOA';
coluna varchar2(100) := 'NOME';
begin
SELECT COUNT(NOME) into cont FROM PESSOA;
if cont = 0 then
execute immediate 'ALTER TABLE '||tabela||' DROP COLUMN '||coluna||'';
commit;
else
('Coluna '||coluna||'não excluído porque contém Dados');
end if;
end;
/
But how will this be used? Is it a trial? Or do you just want to show on the console?
– George Wurthmann
I’m running several blocks like this one (Fields Creation). In this one specifically I would like it to display on the console. That is, if you fall into Else, it displays the message on the console and continues to run the other blocks normally.
– Roknauta