Hello there...
Can anybody tell me what is the difference when I excecute a sql
statement within pl sql with/without "execute immediate" statement
Thanks
Michi :)
Example:
CREATE OR REPLACE PROCEDURE test
BEGIN
DELETE FROM test_table;
execute immediate 'truncate table test_table';
/*SOME HOW THIS STATEMENT I CANT COMPILE*/
truncate table test_table;
/*BUT I CAN COMPILE THIS STATEMENT*/
execute immediate 'truncate table test_table';
END;
Can anybody tell me what is the difference when I excecute a sql
statement within pl sql with/without "execute immediate" statement
Thanks
Michi :)
Example:
CREATE OR REPLACE PROCEDURE test
BEGIN
DELETE FROM test_table;
execute immediate 'truncate table test_table';
/*SOME HOW THIS STATEMENT I CANT COMPILE*/
truncate table test_table;
/*BUT I CAN COMPILE THIS STATEMENT*/
execute immediate 'truncate table test_table';
END;
Comment