Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle Trigger
On Tue, 03 Feb 2004 12:10:46 -0800, Daniel Morgan <damorgan_at_x.washington.edu>
wrote:
>DDL can not be performed using PL/SQL ... for example you can't even do
>this:
>
>BEGIN
> TRUNCATE TABLE my_table;
>END;
>/
>
>What you must do is:
>
>BEGIN
> EXECUTE IMMEDIATE 'TRUNCATE TABLE my_table';
>END;
>/
>
>Same rule applies to creating triggers.
A technically correct answer, unfortunately it's the answer to a different question to that the original poster asked. If you read the post, he says he's already running DDL through JDBC; not PL/SQL.
-- Andy Hassall <andy_at_andyh.co.uk> / Space: disk usage analysis tool <http://www.andyh.co.uk> / <http://www.andyhsoftware.co.uk/space>Received on Tue Feb 03 2004 - 15:14:45 CST
![]() |
![]() |