После вызова процедуры хочу сделать insert. Но программа выдает ошибку PLS-00103 - "Встретился символ Insert"
create or replace procedure on_drop(table_name char(100))
BEGIN
EXECUTE IMMEDIATE 'DROP TABLE ' + table_name + ' CASCADE CONSTRAINT;';
execute immediate 'create table address(
address_id number(9) GENERATED ALWAYS AS IDENTITY,
address_country char(200) NOT NULL,
address_region char(100) NOT NULL,
address_district char(100) NOT NULL,
address_settlement_type char(50) NOT NULL,
address_settlement_name char(100) NOT NULL,
PRIMARY KEY(address_id)
);';
EXCEPTION
WHEN OTHERS THEN
IF SQLCODE != -942 THEN
RAISE;
END IF;
END;
END on_drop;
Выозв процедуры
begin
on_drop('address');
end;