Describe the stored procedure for all tables, views, and columns in Oracle.

Source: Internet
Author: User

Create or replace procedure pro_drop_comment is

Cursor c_table_column is

Select * From user_tab_columns;

Cursor c_table is

Select * From user_tables;

Cursor c_view is

Select * From user_views;

SQL _drop_comment string (100 );

Begin

 

For r_C in c_table_column Loop

SQL _drop_comment: = 'comment on column' | r_c.table_name | '.' |

R_c.column_name | 'is '| '''''';

Execute immediate SQL _drop_comment;

End loop;

 

For r_C in c_table Loop

SQL _drop_comment: = 'comment on table' | r_c.table_name | 'is' | '''''';

Execute immediate SQL _drop_comment;

End loop;

 

For r_C in c_view Loop

SQL _drop_comment: = 'comment on table' | r_c.view_name | 'is' | '''''';

Execute immediate SQL _drop_comment;

End loop;

 

End pro_drop_comment;

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.