Oracle deletes tables, views, sequences, functions, data commands

Source: Internet
Author: User

After executing the following SQL statement, we can get the SQL statements that we really want to execute, and then copy the SQL statements that the programs print out to execute.

--delete Tables Delete data table

The code is as follows Copy Code

Select ' Drop table ' | | table_name | | | Chr (13) | | Chr (a) from user_tables;


--delete views Delete View Www.111cn.net

The code is as follows Copy Code

Select ' Drop View ' | | view_name| | | Chr (13) | | Chr (a) from user_views;


--delete SEQS Delete Sequence

The code is as follows Copy Code

Select ' Drop sequence ' | | sequence_name| | | Chr (13) | | Chr (a) from user_sequences;


--delete functions Delete function

The code is as follows Copy Code

Select ' Drop function ' | | object_name| | | Chr (13) | | Chr from user_objects where object_type= ' FUNCTION ';


--delete procedure Delete stored procedures

The code is as follows Copy Code

Select ' drop procedure ' | | object_name| | | Chr (13) | | Chr from user_objects where object_type= ' PROCEDURE ';


--delete Package Delete a package

The code is as follows Copy Code

Select ' Drop Package ' | | object_name| | | Chr (13) | | Chr from user_objects where object_type= ' PACKAGE ';

Delete data

The code is as follows Copy Code

Delete all sql> TRUNCATE TABLE table_name;

The condition deletes the delete from tablename where col1 = ' Lucy ';

In addition to Gazzo primer, you can delete the Add no logging option, do not write log speed up the deletion

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.