How to exit from pl/sql

From: <wagen123_at_yahoo.com>
Date: Wed, 30 Jan 2008 08:21:11 -0800 (PST)
Message-ID: <b2f61e03-9cd1-44b6-aa30-65b59a623483@p69g2000hsa.googlegroups.com>


Hi,

Oracle10g 10.2.0.2

DECLARE
   str constant VARCHAR2(150) := 'TRUNCATE TABLE t1; BEGIN
   FOR i IN 1..500 LOOP

       EXECUTE IMMEDIATE str;
       ???

   END LOOP;
END;
/

How do I exit from the loop (???) if the EXECUTE statement is successful?

Any pointers?

Thanks
wagen Received on Wed Jan 30 2008 - 10:21:11 CST

Original text of this message