-
What's the command for deleting all data from a schema? I don't want to drop the schema.
Thanks
-
I don't think you can just drop the objects of a schema (unless you write a script to list them all with the corresponding drop statements) with a single command execpt DROP USER
Regards
Jim
Oracle Certified Professional
"Build your reputation by helping other people build theirs."
"Sarcasm may be the lowest form of wit but its still funny"
Click HERE to vist my website!
-
try this
spool drop objects
set head off
select 'drop ' || object_type ||' '|| object_name||';' from user_objects where object_type in ('TABLE','PACKAGE','TRIGGER','SEQUENCE','VIEW');
spool off
then edit the spool file to get rid of the junk and run it.
-
should be spool drop_objects
-
Not to be picky, but what do you mean by data? Data, or objects - which includes tables, which in turn, includes data?
Are you asking how to purge data, but leave the basic structure of the schema intact?
From other post, you would also include package body as an object type.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|