Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Using EXECUTE IMMEDIATE with Create Table SQL Statement not working

793919Oct 4 2010 — edited May 20 2013
Hi ,

I am all the privileges given from the SYSTEM user , but still i am not able to create a table under procedure . Please see these and advice.

create or replace procedure sp_dummy as
begin
Execute Immediate 'Create table Dummy99_99 (Dummy_Field number)';
end;

even i tried this way also



create or replace PROCEDURE clearing_Practise(p_file_id in varchar2, p_country in VARCHAR2,p_mapId in VARCHAR2)
AUTHID CURRENT_USER AS
strStatusCode VARCHAR2(6);
BEGIN
EXECUTE IMMEDIATE 'create table bonus(name varchar2(50))';
commit;
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line('ERROR Creating Table');
END ;
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 17 2013
Added on Oct 4 2010
9 comments
15,783 views