Difference execute immediate within PL SQL

From: michi <wwwmike_at_gmx.ch>
Date: 15 Oct 2003 18:46:05 -0700
Message-ID: <ec0e7914.0310151746.39a077c9_at_posting.google.com>


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; Received on Thu Oct 16 2003 - 03:46:05 CEST

Original text of this message