v_str1 varchar2(200) := null;
cursor get_sql is select 'drop '||o.object_type||' '|| o.object_name|| DECODE(o.OBJECT_TYPE,'TABLE',' CASCADE CONSTRAINTS PURGE') v_str1
from user_objects o
where o.object_type in ('TABLE','VIEW','PACKAGE','TYPE','PROCEDURE','FUNCTION','TRIGGER','SEQUENCE') order by object_type,object_name;
fetch get_sql into v_str1;
execute immediate v_str1;
Tuesday, July 24, 2012
Drop all DB objects - Oracle
Created this for future reference. This SQL goes and drops all user objects in the current DB, great when messing with local Oracle XS DB
Subscribe to: Post Comments (Atom)
I have recently been slacking on content on my blog, between long stressful hours at work and to the wonderful toy that is an iPhone, I have...
I make no claim to be a "computer scientist" or a software "engineer", those titles alone can spark some debate, I regar...
I saw an article (well more of a rant) the other day, by Rob Williams Brain Drain in enterprise Dev . I have to say, I do agree with some o...
This series of posts will be about me getting to grips with JBoss Drools . The reasoning behind it is: SAP bought out my company's curre...
I recently finished 97 Things every programmer should know . Well to be completely honest I did skim over a couple of the 97, but all and al...
I did ennjoyed reading this contentReplyDelete
Aivivu chuyên vé máy bay, tham khảoReplyDelete
gia ve may bay di my
vé máy bay từ mỹ về việt nam giá rẻ
vé máy bay từ canada về việt nam giá rẻ
chuyến bay thương mại từ nhật về việt nam
giá vé máy bay hàn quốc về việt nam
Vé máy bay từ Đài Loan về VN
chuyen bay chuyen gia ve viet nam