Oracle batch annotate and generate HTML

Source: Internet
Author: User

Excel connection column names generate Oracle annotations

NOTES:A2 is a column name, B2 is a comment

= "Comment on column colagreementheader." &A2& "is Q ' {" &B2& "} ';"

The effect is as follows:

Comment on column table1. Id is Q ' {PK} ';
Comment on column table1.col1 is Q ' {counterparty Organization ID} ';
Comment on column table1.col2 is Q ' {Agreement Description} ';

--Generate HTML format

SET MARKUP HTML on SPOOL on pre off Entmap off
SET ECHO OFF
SET Termout OFF
SET Trimout OFF
Set Feedback off
Set heading on
Set Linesize 200
Set pagesize 10000
Set Timing off
Col Nullable for A8
Spool t1.html
Select Tc.column_name,
Tc. data_type| | Decode (tc.data_length,0, "," (' | | tc.data_length| | ') Data_type,
Tc. NULLABLE,
Cc.comments
From User_tab_columns tc,user_col_comments cc
where Tc.table_name=cc.table_name and Tc.column_name=cc.column_name and Tc.table_name= ' TABLE1 '
Order BY column_id;
Spool off

Oracle batch annotate and generate HTML

Related Article

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.