Answer the question
In order to leave comments, you need to log in
What is wrong with oracle procedure?
After procedure call I want to make insert. But the program gives an error PLS-00103 - "Insert symbol encountered"
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;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question