How can we create a table inside an Oracle procedure.

"CREATE TABLE tableName AS". We cannot execute this statement in procedures because upon creation of procedure it would give syntax error.

We can implement this with the help of EXECUTE IMMEDIATE command and then dynamically create table.

create or replace procedure Proc1 as
execute immediate ‘create table NewTable(column1 integer )’;
end ;